Opened 13 years ago
Closed 12 years ago
#2144 closed defect (worksforme)
OSCam crash on FreeBSD
Reported by: | s4f3r | Owned by: | |
---|---|---|---|
Priority: | critical | Component: | General |
Severity: | high | Keywords: | |
Cc: | Sensitive: | no |
Description
Revision
Issue Description
OSCam crash when trying to access Webif.
Generates when trying to access:
Run: oscam -b -c /usr/local/etc/oscam -d 255 -r 2
/var/log/messages:
Sep 30 08:42:28 PLUTO kernel: pid 64393 (oscam), uid 1002: exited on signal 11 (core dumped)
Run: oscam -b -c /usr/local/etc/oscam -d 255 -r 2 -s
/var/log/messages:
Sep 30 08:43:33 PLUTO kernel: pid 64399 (oscam), uid 1002: exited on signal 4 (core dumped)
When the issue occurs
Trying to access Webif
How the issue is reproducable
Trying to access Webif
<Don't forget to ATTACH (not post here) a log file of oscam in debug mode (start oscam with -d255)!>
Attachments (1)
Change History (10)
by , 13 years ago
comment:1 by , 13 years ago
comment:2 by , 13 years ago
It's just the ThreadID and the "h" means that this log entry comes form the http server. Please report with a gdb/valgrind log here http://www.streamboard.tv/wbb2/thread.php?threadid=30975 as we can't do anything with this error description here.
Edit: How did you solve your compilation/link problem? Maybe that's connected with this?
comment:3 by , 13 years ago
Reported now.
Solved it with:
cmake -DWEBIF=1 -DHAVE_PCSC=1 -DOPTIONAL_INCLUDE_DIR=/usr/local/include/PCSC -DOPTIONAL_LINK_DIR=/usr/local/lib ..
comment:4 by , 13 years ago
Try applying the following changes:
Index: oscam-http-helpers.c
===================================================================
--- oscam-http-helpers.c (revision 5965)
+++ oscam-http-helpers.c (arbetskopia)
@@ -470,6 +470,7 @@
void send_headers(FILE *f, int32_t status, char *title, char *extra, char *mime, int32_t cache, int32_t length, char *content, int8_t forcePlain){
time_t now;
+ struct tm result;
char timebuf[32];
char buf[sizeof(PROTOCOL) + sizeof(SERVER) + strlen(title) + (extra == NULL?0:strlen(extra)+2) + (mime == NULL?0:strlen(mime)+2) + 350];
char *pos = buf;
@@ -478,7 +479,8 @@
pos += snprintf(pos, sizeof(buf)-(pos-buf), "Server: %s\r\n", SERVER);
now = time(NULL);
- strftime(timebuf, sizeof(timebuf), RFC1123FMT, gmtime(&now));
+ gmtime_r(&now, &result);
+ strftime(timebuf, sizeof(timebuf), RFC1123FMT, &result);
pos += snprintf(pos, sizeof(buf)-(pos-buf), "Date: %s\r\n", timebuf);
comment:5 by , 12 years ago
Applied the changes on #5967, but:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 801884c00 (LWP 100722/oscam)] 0x00000008011c2de9 in gmtime_r () from /lib/libc.so.7 (gdb) bt #0 0x00000008011c2de9 in gmtime_r () from /lib/libc.so.7 #1 0x00000008011c3758 in gmtime_r () from /lib/libc.so.7 #2 0x000000080092aa38 in pthread_once () from /lib/libthr.so.3 #3 0x00000008011c252f in timegm () from /lib/libc.so.7 #4 0x00000008011c3dbf in gmtime () from /lib/libc.so.7 #5 0x0000000000427570 in send_headers (f=0x80142f000, status=403, title=0x4b6996 "Forbidden", extra=0x0, mime=0x4b6b7a "text/html", cache=0, length=111, content=0x0, forcePlain=0 '\0') at oscam-http-helpers.c:482 #6 0x0000000000427aa2 in send_error (f=0x80142f000, status=403, title=0x4b6996 "Forbidden", extra=0x0, text=0x4bce89 "Access denied.", forcePlain=0 '\0') at oscam-http-helpers.c:526 #7 0x0000000000439198 in process_request (f=0x80142f000, in={s_addr = 1235937626}) at /usr/home/cardserver/oscam-svn/oscam-http.c:3963 #8 0x000000000043a242 in serve_process (conn=0x8018a90a0) at /usr/home/cardserver/oscam-svn/oscam-http.c:4288 #9 0x0000000800925264 in pthread_getprio () from /lib/libthr.so.3
comment:6 by , 12 years ago
There could be two reasons:
- There's some kind of linking problem. Maybe somethin 32bit vs. 64bit? Is this a 64bit machine?
- Maybe it is actually a totally differen corruption but just shows up on the libc call "by accident". Could you please create a valgrind-log?
comment:7 by , 12 years ago
Is this still happening with current versions? Can you post a current gdb log if it's not working and the valgrind log I wanted? Can you answer my questions above? If not I'll close that ticket soon.
comment:9 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
From the attached oscam.log:
The "1844000 h" part seems strange right? What does it mean?