Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl segfault if script not found #82

Closed
faxm0dem opened this issue Aug 21, 2014 · 7 comments
Closed

perl segfault if script not found #82

faxm0dem opened this issue Aug 21, 2014 · 7 comments
Labels
Milestone

Comments

@faxm0dem
Copy link
Contributor

syslog-ng segfaults when it can't find the script for the perl module.
The ERRNO is hidden as it gets spit on STDERR.

See syslog-ng/syslog-ng/issues/221

@algernon algernon added bug and removed ready labels Aug 25, 2014
@talien
Copy link
Contributor

talien commented Sep 23, 2014

Hi!

I have a quick'n'dirty fix for this in my repo (talien/syslog-ng-incubator), on branch f/perl-fixes.
Could you please verify, that this patch solves your use-case? Can you test this patch in threaded(yes) environment? I think I should rethink the unholy marriage of our perl destination and syslog-ng multithreaded model.

@faxm0dem
Copy link
Contributor Author

unfortunately, your branch causes syslog-ng to segfault every time.
When using master, I get 50% segfaults on startup, and sometimes I get perl errors from init function which seem to indicate a race condition. I suspect something not being enforced in the right order.
Here's the stack trace from your branch:

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/sbin/syslog-ng -Fv'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff27009cc73 in ?? () from /usr/lib/x86_64-linux-gnu/perl5/5.20/auto/Sub/Name/Name.so
(gdb) bt full
#0  0x00007ff27009cc73 in ?? () from /usr/lib/x86_64-linux-gnu/perl5/5.20/auto/Sub/Name/Name.so
No symbol table info available.
#1  0x00007ff271e9dcfb in Perl_pp_entersub () from /usr/lib/x86_64-linux-gnu/libperl.so.5.20
No symbol table info available.
#2  0x00007ff271e965b6 in Perl_av_iter_p () from /usr/lib/x86_64-linux-gnu/libperl.so.5.20
No symbol table info available.
#3  0x000000000255f400 in ?? ()
No symbol table info available.
#4  0x0000000002a05490 in ?? ()
No symbol table info available.
#5  0x00000000025b8440 in ?? ()
No symbol table info available.
#6  0x0000000000000000 in ?? ()
No symbol table info available.

@talien
Copy link
Contributor

talien commented Sep 24, 2014

Hi!

That's bad news. Can you get me the most simple config, on which you can reproduce the segfault?

@talien talien added this to the 0.4.0 milestone Sep 26, 2014
@juhaszviktor
Copy link
Contributor

Hi!

Sorry, but I can't reproduce this segfault at my machine.
Can you share your config and the core file of syslog-ng?
And of course description of the steps causes the segfault will be welcome :)
It would be a great help for us.

Thanks,
Viktor

@faxm0dem
Copy link
Contributor Author

did you run the test on @talien's branch or on master?

@juhaszviktor
Copy link
Contributor

I tried it on master.

@faxm0dem
Copy link
Contributor Author

I cannot reproduce with master and a minimal config. Thanks for looking into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants