Re: Userspace agent crash and kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



But how can you be sure that this fault handler will be called when
the agent crashes


On Fri, Nov 21, 2014 at 2:07 PM, Pranay Srivastava <pranjas@xxxxxxxxx> wrote:
> Hi Kevin,
>
> Request you not to top post :-) .
>
>> On Tue, Nov 18, 2014 at 10:15 AM, Pranay Srivastava <pranjas@xxxxxxxxx> wrote:
>>> Hi Kevin
>>>
>>>
>>>
>>>
>>> On Tue, Nov 18, 2014 at 1:19 PM, Kevin Wilson <wkevils@xxxxxxxxx> wrote:
>>>> Hi,
>>>> I want to write a kernel module which interacts with a userspace daemon.
>>>> There are cases when the userspace daemon can terminate by some signals.
>>>> There are also cases where the userspace daemon can crash (in some abnormal
>>>> cases). Is there a way that the kernel module will be aware of such
>>>> userspace agent crash, in order to reset its state ?
>>>
>>> Can't you reset it when the daemon is about to be killed from the
>>> userspace itself? Depends on how complex/simple you want
>>> this but there are several possibilities. Care to tell me how you
>>> thought about doing this and where you got stuck?
>>>
>>>
>>>>
>>>> Regards,
>>>> Kevin
>>>>
>>>> _______________________________________________
>>>> Kernelnewbies mailing list
>>>> Kernelnewbies@xxxxxxxxxxxxxxxxx
>>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>>
>>> Regards
>>> --
>>>         ---P.K.S
>>
>>On Fri, Nov 21, 2014 at 4:25 PM, Kevin Wilson <wkevils@xxxxxxxxx> wrote:
>> The thing is that crash of the daemon sometimes occur, from this
>> reason or other.
>> The question is how the kernel module will be aware of such
>> userspace agent crash, in order to reset its state ?
>
> I don't think kernel will know itself. The simplest you can do is put
> a fault handler in userspace code
> and have it do a write on a sysfs/procfs file or an ioctl or maybe
> send signal or enqueue something
> to another heartbeat daemon , etc, whatever method seems most
> appropriate to you.
>
> Does this sound useful?
>
>>
>> Regards,
>> Kevin
>>
>>
>
>
> --
>         ---P.K.S

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux