Skip Menu |

This queue is for tickets about the Kafka CPAN distribution.

Report information
The Basics
Id: 99367
Status: resolved
Priority: 0/
Queue: Kafka

People
Owner: SGLADKOV [...] cpan.org
Requestors: MARKLE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.8008
Fixed in: (no value)



Subject: use of sigtrap pragma breaks callers that use POSIX::sigaction
Hi. My calling script uses POSIX::sigaction to register signal handlers and stack them up so they all fire appropriately. When I "use Kafka::Connection" anywhere, all of a sudden it all breaks. I get an error message that I don't expect, with the sigtrap stack trace. When it tries to run that last stacked-up oldhandler, it goes out to lunch and kills stderr somehow, leaving me guessing. It looks like you left "use sigtrap" in Kafka::IO. When I comment that out, everything works fine. I think it is usually up to the user to "use sigtrap" or not, depending on what they want to do with signals. Since there does not appear to be any use of signals in Kafka.pm and related libraries, I would suggest removing this line. If you need that for the test scripts, please "use sigtrap" in the top-level test scripts. Thank you. Mark
BTW I think the problem is that the signal handler installed by sigtrap that print the stack traces also throws an ABRT signal at the end to terminate execution. This causes the process to dump core. (Sometimes?) I can't run the final handler coderef in eval {} because of that... it kills the program anyway. And if I install my own signal handler for ABRT, it seems to go out to lunch. (Recursion?) Everything I'm using it for still works fine when I remove "use sigtrap" from Kafka::IO. I expect all Kafka.pm's test scripts will run, but I haven't tried that yet. Thank you.
Mark - Indeed sigtrap was left there by mistake, I've removed it - thank you for bringing it up to attention. The updated version of Kafka module will be released via CPAN in the near future. In the meantime you can access latest code via Kafka repository on Github: https://github.com/TrackingSoft/Kafka
We've released 0.8009 .