Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#4194 closed defect (fixed)

OScam shutdown if (kill -1 `pidof oscam`) is sent to reinit user db + suggestion how to fix

Reported by: stella Owned by:
Priority: critical Component: General
Severity: high Keywords:
Cc: Sensitive: no

Description

Sorry to copy this issue again. but i have a suggestion

  • yes this command works - but if command be repeated several times the crash of oscam inevitable

I have a suggestion how to fix it

  • see the reloads configs: (oscam.c)

608 * - useraccounts (oscam.user)
609 * - readers (oscam.server)
610 * - services ids (oscam.srvid)
611 * - tier ids (oscam.tiers)
the problem is all reloads = oscam sometimes make twice! .. it could be safe but except double simultaneous reload of readers

so i suggest to remove all reloads (server. srvid. tiers) except reload of useraccount (oscam.server) .. this what we expect when press Reinit User DB

Revision
8538 works with this command kill -1 pidof oscam
all later revision after that makes oscam crash

Issue Description
if you send this command to oscam with ssh (kill -1 pidof oscam) oscam should reinit user db, this works fine in 8538 but in later revisions oscam will crash and shutdown permanetly.

When the issue occurs
right after sending this command in ssh
kill -1 pidof oscam

How the issue is reproducable
send this command to oscam kill -1 pidof oscam

Change History (8)

comment:1 by stella, 9 years ago

#2745 may be it's related issue

there were comment -

Resolution set to fixed
Status changed from new to closed
Should be fixed in r7988.
http://www.streamboard.tv/oscam/changeset/7988

there are several fixes in oscam.c for r7988 .. but latest version of oscam dont have these fixes in oscam.c

Last edited 9 years ago by stella (previous) (diff)

comment:2 by Admin, 9 years ago

From what I see the fixes from r7988 are still in. It will very likely be some completely different reason here (but with same result).
Can you check the exact revision where it stops working? You said r8538 is the last working but after that there were in fact some revision that really shouldn't affect anything here (compile related, webinterface etc.). Which was the next that you tried?

comment:3 by stella, 9 years ago

first time to run kill -1 pidof oscam

  • it's all ok

2015/06/04 23:20:08 0 s (config) userdb reloaded: 400 accounts loaded, 0 expired, 0 disabled
2015/06/04 23:20:08 0 s (config) userdb 400 accounts freed
2015/06/04 23:20:11 0 s (config) readerdb 2 readers freed
2015/06/04 23:20:11 0 s (stat) loadbalancer: file /tmp/.oscam/stat not found
flush and re-open log file
2015/06/04 23:20:11 0 s >> OSCam << cardserver log switched, version 1.20-unstable_svn, build r10663 (x86_64-redhat-linux)
2015/06/04 23:20:43 540008C0 h (reader) kont [cccam] Restarting reader
2015/06/04 23:20:43 540008C0 h (reader) kont [cccam] creating thread for device 195.55.55.100
2015/06/04 23:20:43 50004E20 p (reader) 195.55.55.100: resolved ip=195.55.55.100
2015/06/04 23:20:43 50004E20 p (reader) kont [cccam] connecting to 195.55.55.100:40000
2015/06/04 23:20:43 50004E20 p (reader) kont [cccam] proxy initialized, server 195.55.55.100:40000
flush and re-open log file

comment:4 by stella, 9 years ago

but second time to run kill -1 pidof oscam
oscam stops when initialized proxy (reader) and all reloads goes twice

2015/06/04 23:21:15 0 (config) userdb reloaded: 400 accounts loaded, 0 expired, 0 disabled
2015/06/04 23:21:15 0 (config) userdb 400 accounts freed
2015/06/04 23:21:15 0 s (config) userdb reloaded: 400 accounts loaded, 0 expired, 0 disabled
2015/06/04 23:21:15 0 s (config) userdb 400 accounts freed
2015/06/04 23:21:16 50004E20 p (reader) kont [cccam] disconnected: reason close
2015/06/04 23:21:19 0 (config) readerdb 2 readers freed
2015/06/04 23:21:21 0 (-) -- Skipped 1 duplicated log lines --
2015/06/04 23:21:21 0 (reader) kont [cccam] creating thread for device 195.55.55.100
2015/06/04 23:21:21 0 (stat) loadbalancer: file /tmp/.oscam/stat not found
2015/06/04 23:21:21 0 >> OSCam << cardserver log switched, version 1.20-unstable_svn, build r10663 (x86_64-redhat-linux)
flush and re-open log file
2015/06/04 23:21:21 0 s (reader) kont [cccam] creating thread for device 195.55.55.100
2015/06/04 23:21:21 0 s (stat) loadbalancer: file /tmp/.oscam/stat not found
2015/06/04 23:21:21 0 s >> OSCam << cardserver log switched, version 1.20-unstable_svn, build r10663 (x86_64-redhat-linux)
2015/06/04 23:21:21 D59610 p (reader) 195.55.55.100: resolved ip=195.55.55.100
2015/06/04 23:21:21 D59610 p (reader) kont [cccam] connecting to 195.55.55.100:40000
2015/06/04 23:21:21 5C0B3EA0 r (reader) 195.55.55.100: resolved ip=195.55.55.100
2015/06/04 23:21:21 5C0B3EA0 r (reader) kont [cccam] connecting to 195.55.55.100:40000
2015/06/04 23:21:21 5C0B3EA0 r (reader) kont [cccam] WARNING: client->udp_fd was not 0
2015/06/04 23:21:21 D59610 p (reader) kont [cccam] proxy initialized, server 195.55.55.100:40000
2015/06/04 23:21:23 5C0B3EA0 r (cccam) init error from reader kont
2015/06/04 23:21:23 5C0B3EA0 r (reader) kont [cccam] proxy initialized, server 195.55.55.100:40000
2015/06/04 23:21:52 D59610 p (reader) kont [cccam] connecting to 195.55.55.100:40000

comment:5 by stella, 9 years ago

the build where command works ok - actually even older then r8538
it's a custom build from spring 2013 (oscam-yuriks t1856)

ps.
made new test server r10670 debian7 and made newcamd reader
the command kill -1 pidof oscam works only first time. second time it gives the same error

Last edited 9 years ago by stella (previous) (diff)

comment:6 by Aeon, 9 years ago

should be fixed with 10687, please give it a try

comment:7 by Aeon3, 9 years ago

Resolution: fixed
Status: newclosed

comment:8 by Jimmy, 7 years ago

So is there away to just reload the oscam.user file now ?

Note: See TracTickets for help on using tickets.