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

Add global() parameters for legacy parser config statements #15

Closed
rgerhards opened this issue Jan 24, 2014 · 3 comments · Fixed by #23
Closed

Add global() parameters for legacy parser config statements #15

rgerhards opened this issue Jan 24, 2014 · 3 comments · Fixed by #23

Comments

@rgerhards
Copy link
Member

Currently, there is no equivalent for runtime/parser.c legacy config statements. This is especially bad as we do not want to add additional config statements in legacy style.

The current set of legacy statements should be added to runtime/glbl.c parameters, which are configured via the global() statement. As parser.c only manipulates global variables, it should be sufficient to access the same variables from glbl.c as well. It's probably a bit tricky here to guard against setting parameters via legacy style and global(), but we may accept this weakness for a while. Parser parameters should begin with "parser." inside the global name space.

@nbrownus
Copy link
Contributor

Started down this path, wanted you to check over the first one I tackled before I went through the rest

nbrownus/rsyslog@6711ea4

I realize that commit removes the old style configuration directive, not sure if you would like it to stick around or not. If it should stick around, would moving it to glbl.c make more sense?

@rgerhards
Copy link
Member Author

Looks great!

The current set of old style directives need to stick. That's a rsyslog policy: never break compatibility without a hard need. I suggest that you also move the old-style definitions over to glbl.c (if it is already supported there, at least). We should just not add any more old style directives.

onceking added a commit to onceking/rsyslog that referenced this issue May 3, 2016
curl use SIGALRM to timeout handling. but it doesn't work in linux
threads and the signal is delivered to an *arbitary* threads which
almost guarantees crashing if a wrong thread picks up the signal.

```
(gdb) bt
 #0  0x00007f8b8859aa6d in addbyter () from libcurl.so.4
 rsyslog#1  0x00007f8b8859b993 in dprintf_formatf () from libcurl.so.4
 rsyslog#2  0x00007f8b8859bfd5 in curl_mvsnprintf () from libcurl.so.4
 rsyslog#3  0x00007f8b8859ac42 in curl_msnprintf () from libcurl.so.4
 rsyslog#4  0x00007f8b8858bbf6 in Curl_failf () from libcurl.so.4
 rsyslog#5  0x00007f8b885826ef in Curl_resolv_timeout () from libcurl.so.4
 rsyslog#6  0x00007f8b88cf2dfd in clock_gettime () from /lib64/libc.so.6
 rsyslog#7  0x00007f8b6c01b1e0 in ?? ()
 rsyslog#8  0x00007f8b887d58e8 in Curl_crealloc () from libcurl.so.4
 rsyslog#9  0x00007f8b6c01a5a0 in ?? ()
 rsyslog#10 0x00007f8b887d58e8 in Curl_crealloc () from libcurl.so.4
 rsyslog#11 0x00007f8b6c002860 in ?? ()
 rsyslog#12 0x000000000000000a in ?? ()
 rsyslog#13 0x00007f8b6c01b5b0 in ?? ()
 rsyslog#14 0x00007f8b6c0028c0 in ?? ()
 rsyslog#15 0x00007f8b6c00c630 in ?? ()
 rsyslog#16 0x000000000000000a in ?? ()
 rsyslog#17 0x00007f8b6c0028c0 in ?? ()
 rsyslog#18 0x0000000000000018 in ?? ()
 rsyslog#19 0x00007f8b885a5432 in Curl_llist_remove () from libcurl.so.4
 rsyslog#20 0x0000000004000000 in ?? ()
 rsyslog#21 <signal handler called>
 rsyslog#22 0x0000006e0000005b in ?? ()
Cannot access memory at address 0x0
```

References
* https://curl.haxx.se/libcurl/c/threadsafe.html
* https://curl.haxx.se/libcurl/c/CURLOPT_NOSIGNAL.html
* https://www.redhat.com/archives/libvir-list/2012-October/msg00008.html
rgerhards pushed a commit that referenced this issue Feb 21, 2019
@lock
Copy link

lock bot commented Dec 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants