Opened 8 years ago

Last modified 7 years ago

#4049 new defect

OScam crush sometimes, perhaps cacheex camd35 TCP problems?

Reported by: fz Owned by:
Priority: major Component: Cache-EX
Severity: medium Keywords: camd35 crash
Cc: Sensitive: no

Description

Revision

Latest oscam r10084.

Issue Description

Sometimes oscam crushed, I have maked a debugging trace:

#0 0x00007ffff6f5086a in pthread_rwlock_rdlock () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x0000000000407b69 in check_is_pushed (cw=0x0, cl=0x7fffe81e9fa0) at /home/cs/oscam-svn-debug/oscam-cache.c:88
#2 0x0000000000479ba1 in camd35_cache_push_chk (cl=0x7fffe81e9fa0, er=0x7fffdc188540) at /home/cs/oscam-svn-debug/module-camd35.c:819
#3 0x00000000004312c0 in work_thread (ptr=0x7fffe816deb0) at /home/cs/oscam-svn-debug/oscam-work.c:376
#4 0x00007ffff6f4cb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00007ffff6c967bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()

When the issue occurs

I din't found a special reason for those oscam crash, my cache size 1300-1400 around, that is not too much.

Change History (8)

comment:1 by fz, 8 years ago

Another tracelog:

#0 0x0000000000477167 in ll_count (l=0x549048e8) at /home/cs/oscam-svn-debug/oscam-llist.h:77
#1 0x0000000000479946 in camd35_cache_push_chk (cl=0x7fffdc1a5e30, er=0x7fffe4020370) at /home/cs/oscam-svn-debug/module-camd35.c:773
#2 0x00000000004312c0 in work_thread (ptr=0x7fffdc1a5d00) at /home/cs/oscam-svn-debug/oscam-work.c:376
#3 0x00007ffff6f4cb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007ffff6c967bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x0000000000000000 in ?? ()

comment:2 by nm1, 8 years ago

It causes an asynchronous processing of ecm request.
All part of oscam are not thread safe.

in reply to:  2 comment:3 by fz, 8 years ago

Replying to nm1:

It causes an asynchronous processing of ecm request.
All part of oscam are not thread safe.

Good.
And what I can do for this problem?
How I can resolv this issue?
I must optimize my configurations? (How?)

comment:4 by nm1, 8 years ago

Only wait ..., the developers should make oscam full thread safe

comment:5 by Philipp, 8 years ago

+1

This is only a statement. Testet with 10050 + 10084.
It chrashed also when using only cccamext clients and no chachex. I have no log sorry. I will try to make a log.

comment:6 by today, 8 years ago

2 logs with gdb, r10071

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7e80700 (LWP 7117)]
ll_iter_next_nolock (it=it@entry=0x7fffa00521b0) at oscam-llist.c:151
151 { return it->cur->obj; }
(gdb) bt
#0 ll_iter_next_nolock (it=it@entry=0x7fffa00521b0) at oscam-llist.c:151
#1 0x000000000045a7d4 in ll_li_next (li=li@entry=0x7fffa00521a0) at oscam-llist.c:665
#2 0x0000000000417a90 in cc_cache_push_chk (cl=0x7422d0, er=0x7fffa8067040) at module-cccam.c:2264
#3 0x000000000045fce6 in work_thread (ptr=<optimized out>) at oscam-work.c:369
#4 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7e80700) at pthread_create.c:312
#5 0x00007ffff78f0efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) l
146 }
147 else if(it->l->initial && !it->prv)
148 { it->cur = it->l->initial; }
149
150 if(it->cur)
151 { return it->cur->obj; }
152 }
153 return NULL;
154 }
155

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7eb0700 (LWP 16570)]
pthread_rwlock_rdlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:41
41 ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: No such file or directory.
(gdb) where
#0 pthread_rwlock_rdlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:41
#1 0x000000000043c13a in check_is_pushed (cw=0x0, cl=cl@entry=0x738080) at oscam-cache.c:88
#2 0x0000000000417b67 in cc_cache_push_chk (cl=0x738080, er=0x7fffd0035200) at module-cccam.c:2297
#3 0x000000000045fce6 in work_thread (ptr=<optimized out>) at oscam-work.c:369
#4 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7eb0700) at pthread_create.c:312
#5 0x00007ffff78f0efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) l
36 in ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
(gdb)

comment:7 by Aeon, 7 years ago

what is the value of your max_cache_time ?
it should be at least clienttimeout + 2

try increasing it

this could happen if the cw gets removed from cache while being pushed out

Last edited 7 years ago by Aeon (previous) (diff)

comment:8 by theparasol, 7 years ago

perhaps hardcode clienttimeout + 2 ?

Note: See TracTickets for help on using tickets.