RE: Crash when sending a lot of messages through a unix socket

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

 



Hi all,

Just FYI, I set the MSG_DONTWAIT flag at my logging socket and now instead of crash I get failure of sending the message (which is much better than crashing...)

Thanks,
Panos
--
http://www.cern.ch/psakkos
________________________________________
From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] on behalf of Panagiotis Sakkos [panos.sakkos@xxxxxxx]
Sent: 03 May 2012 10:31
To: kernelnewbies@xxxxxxxxxxxxxxxxx
Subject: RE: Crash when sending a lot of messages through a unix socket

Hi Mulyadi!

I can't see your point, how can I have a race condition while I am atomic?

Thanks for your response,
Panos
________________________________________
From: Mulyadi Santosa [mulyadi.santosa@xxxxxxxxx]
Sent: 02 May 2012 19:55
To: Panagiotis Sakkos
Cc: kernelnewbies@xxxxxxxxxxxxxxxxx
Subject: Re: Crash when sending a lot of messages through a unix socket

Hi :)

On Wed, May 2, 2012 at 8:43 PM, Panagiotis Sakkos <panos.sakkos@xxxxxxx> wrote:
> Hi,
>
> I am trying to log information from within the kernel with the use of a unix
> socket (/dev/log).
> My code is a kprobe handler, so while executing I am atomic and
> uninterrupted.
> The crashes begin when I do stress tests against my module, so i.e. more
> than 50 logs per second.
>

Maybe that's the problem......under "rapid" call, kprobe handler must
allocate stack for unwinding the call more and more. Not to mention
that it began to push reentrancy problem to the surface.

Regarding reentrancy, IMO think like this...your handler called
once...ok fine, twice, perhaps still fine...but maybe more than 50 per
sec, not to mention the possibility that they are executed by more
than 1 core at once, perhaps that's the problem. race condition....




--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

_______________________________________________
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