-
Notifications
You must be signed in to change notification settings - Fork 469
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
printers.cgi and jobs.cgi crash with segfault #1699
Comments
CUPS.org User: mike If you run cupsd in the foreground (cupsd -f) then core files will be allowed. Alternately, a "make test" will run a test server on port 8631 so you can see what is going on... Let me know how you make out... |
CUPS.org User: heisenbug OK... tried that, but I'm not getting any core files. They're not stopped by the ulimit: server:/usr/local/cups/var/log/cups#ulimit -a If I run the cgi script manually I get a core, but I don't know if it's a valid test. In any case, I've trussed the application: truss -f -t !time -o /tmp/cupsd.truss /usr/local/cups/sbin/cupsd -f error_log_2.txt and cupsd.truss attached. |
CUPS.org User: julianct This seems to be a bug in cgi-bin/ipp-var.c at line 777 (the debug fprintf()). If the prefix argument is NULL the fprintf() will fail. I modified the statement to be: fprintf(stderr, "DEBUG2: cgiSetIPPObjectVars(obj=%p, prefix="%s", " This fixed the problem for me on Solaris 9. |
CUPS.org User: julianct There are a few other places where calls to fprintf() can pass NULL arguments for "%s" formats: cgi-bin/ipp-var.c (line 980) These prevent viewing/modification of printers. I'm still looking for more :-) |
CUPS.org User: heisenbug Looks like there's another on in scheduler/log.c, at line 213. This one can be provoked by setting "LogLevel debug2" and browsing to http://server:631/jobs/ - instant crash of cupsd. Fortunately, I got a core from this one: server:/usr/local/cups/var/log/cups#gdb -c core /usr/local/cups/sbin/cupsd |
CUPS.org User: mike Fixed in Subversion repository. |
"str1699.patch": Index: html.c--- html.c (revision 5547)
@@ -102,7 +102,8 @@
Index: var.c--- var.c (revision 5547)
|
Version: 1.2.0
CUPS.org User: heisenbug
New compile and clean install on Solaris 9 (gcc 3.3.2), with the getifaddrs patch. I get a segfault (noted in the error_log) when I try to list printers or completed/all jobs via the HTTP interface. The commandline interface works fine (lpstat -W completed -o).
How can I get the cgi to dump a core for analysis? I don't see anything obvious in the cupsd.conf file.
Scope unknown - I don't have any other testbed machines available to me :(
The text was updated successfully, but these errors were encountered: