Opened 13 years ago

Closed 13 years ago

#1767 closed defect (fixed)

Restart from webif not work

Reported by: DimitarCC Owned by:
Priority: minor Component: Webinterface
Severity: medium Keywords:
Cc: Sensitive: yes

Description

Revision

4963-4966 mips tuxbox

Issue Description

cant restart oscam from webif also when i restart it from receiver menu sometimes it have to do it 2 times to start working

How the issue is reproducible

when i try to restart oscam from webif it says restarting and counting 3,2,1 and after that it just turn off and page cant be loaded

Attachments (1)

oscam.log (2.5 KB ) - added by spock 13 years ago.
oscam.log d255

Download all attachments as: .zip

Change History (37)

comment:1 by spock, 13 years ago

I can confirm this, been like this for some days for me now, but I did not keep track of what revision it appeared in.

What seems to happen is that oscam is still running in the background, unresponsive.

Last edited 13 years ago by spock (previous) (diff)

comment:2 by spock, 13 years ago

The problems only occurs on my dm500hd stb. Oscam on my linux box doesn't show this problem.

comment:3 by Deas, 13 years ago

Resolution: invalid
Status: newclosed

no log => closed...

by spock, 13 years ago

Attachment: oscam.log added

oscam.log d255

comment:4 by spock, 13 years ago

The log doesn't show anything, but attached above. I noticed it also happens when pressing the shutdown button, oscam just keeps running in background, unresponsive.

This was a terminal ctrl-c from me: 2011/04/11 1:04:26 2AAC6C70 s exit with signal 2

Last edited 13 years ago by spock (previous) (diff)

comment:5 by spock, 13 years ago

Resolution: invalid
Status: closedreopened

comment:6 by hk2k2, 13 years ago

same issue here, on my mipsel dreamboxes.

on 4946, this was ok, last versions are not ok! and oscam is still running in background, only the webif is down.

2011/04/11 22:34:28 2C4CB4B0 h Refresh Reader/Tiers requested by WebIF from 192.168.0.193
2011/04/11 22:34:31 2C4CB4B0 h Restart requested by WebIF from 192.168.0.193
2011/04/11 22:34:31 2C4CB4B0 h restart oscam requested
2011/04/11 22:34:31 2C4CB4B0 h HTTP Server: Shutdown requested from 192.168.0.193
2011/04/11 22:34:31 2AAC6860 s save lb stats thread started
2011/04/11 22:34:31 0 loadbalancer: statistic saved 0 records to /tmp/.oscam/stat

Last edited 13 years ago by hk2k2 (previous) (diff)

comment:7 by spock, 13 years ago

No success with 4978.

comment:8 by DimitarCC, 13 years ago

to me also not work with head revision :(

comment:9 by DimitarCC, 13 years ago

Component: GeneralWebinterface
Priority: criticalblocker
Sensitive: set

comment:10 by DimitarCC, 13 years ago

It not works after rev. 4946. 4946 is the last working for me!

Last edited 13 years ago by DimitarCC (previous) (diff)

comment:11 by DimitarCC, 13 years ago

I was made more test. If i replace the oscam binary while it was running and after that restart the oscam from receiver menu in the webif the rev number does not change. that means oscam is not unloaded from memory. to can restart oscam i have to first say restart from webif. then after web service is shut down then to restart from the receiver menu. But that not always work since after restart from webif in many case oscam freeze and to restart it i need to reboot the receiver. I think oscam suffer from heavy memory or thread problems in the moment and maybe that is also connected with ticked number #1775 and #1776 where also i think is memory or thread related problem. in revision prior 4947 everything was work just fine.
P.S. the log does not show up nothing since the whole oscam freeze and the thread that makes the log freeze also! (ofcource this is my assumption only)

comment:12 by alno, 13 years ago

The restart is not a 'coldstart' The outer oscam process stay running - just the inner process becomes restartet. Exchanging the binary is NOT possible with restart option. This only works with shutdown and new start from outside

comment:13 by alno, 13 years ago

Priority: blockerminor
Severity: highmedium

comment:14 by DimitarCC, 13 years ago

Yes the problem is that even after shutdown from the receiver menu it NOT shutdown! It stays in the memory and after that not matter how many time i start it from outside it still show up the old rev since the memory was not changed! And ofcource i know change the binary have to happen after shutdown oscam. just kiling oscam is not posible at the curent state. to kill it as i said first have to do restart from webif and after that to shutdown it. otherwise shutdown not really shutdown oscam!

comment:15 by alno, 13 years ago

which revision you have actually tested? Also 'shutdown from receiver menu' is a black hole. Nobody knows what your receiver does to perform the shutdown. You can provide us with the scripts performed from your receiver in case of shutdown?

comment:16 by DimitarCC, 13 years ago

i was tested all the revisions after 4946. No success with webif restart. Last working that i was test is 4946. The script is that

#!/bin/sh
case "$1" in
start)

exec start-stop-daemon -S -x /usr/bin/oscam -- -b -c /etc/tuxbox/config
;;

stop)

exec start-stop-daemon -K -R 2 -x /usr/bin/oscam
;;

restart|reload)

$0 stop
sleep 1
$0 start
;;

version)

echo "1.0"
;;

info)

echo "oscam 1.0"
;;

*)

echo "Usage: $0 start|stop|restart"
exit 1
;;

esac
exit 0

Actually that happen to all dreamboxes i have. No matter image. I use Pli and Gemini and at both same result. It not want to shutdown!

comment:17 by spock, 13 years ago

Last edited 13 years ago by spock (previous) (diff)

comment:18 by DimitarCC, 13 years ago

is that fixed or not yet? in the rev [5005] still no luck with restart :(

comment:19 by Admin, 13 years ago

Well, according to trulli2103 in the forum, it works now for him. Could you please try to disable some features in order to check which feature creates the problem? I mean anticascading, dvbapi, monitor, servers, clients. Start with a minimal config and enable one by one.

BTW: You should also really think about reducing your srvids/provids to the really necessary ones. This is not the issue for this restart problem but may rise others like huge memory consumption or slow performance.

comment:20 by DimitarCC, 13 years ago

well i was test if i have more that 2 users and more that 2 cccam readers(or 1 internal and 1 cccam reader) the weif restart do not work. with 1 reader and 2 users it works!

comment:21 by Admin, 13 years ago

Strange...I got 3 cccam readers, 2 internal readers, 2 camd35 readers, 3 cccam clients and 15 newcamd clients on a VU+ (also MIPS) and restart works. However, I use mgcamd instead of dvbapi (that's where all these newcamd clients comes from).
So if it's not the dvbapi, I'm still wondering what might be different. Could you post your config files (remember to remove passwords, keys and IPs) here?

comment:22 by spock, 13 years ago

It's working for me too now. However I have to wait like 10-15 seconds more then usual after pushing the restart button until it's back up again.

comment:23 by DimitarCC, 13 years ago

ell i try the last rev [5014].....
this time on restart oscam just crash.
here is copy of the log i think will be interesting.

011/04/15 9:13:39 2B0CB4B0 r IFD: Closing device /dev/sci0
2011/04/15 9:13:39 2B0CB4B0 r IFD: Deactivating card
2011/04/15 9:13:39 2B0CB4B0 r ERROR, function call ioctl(reader->handle, IOCTL_SET_DEACTIVATE)<0 returns error.
2011/04/15 9:13:39 2B0CB4B0 r ERROR, function call Sci_Deactivate(reader) returns error.
2011/04/15 9:13:39 2AAC6C70 s thread 2B0CB4B0 killed!
2011/04/15 9:13:39 2AAC6C70 s killing reader xxxx
2011/04/15 9:13:40 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (xxx,xxx.xxx.xxx.xxx)
2011/04/15 9:13:40 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:40 2AAC6C70 s thread 2B1CB4B0 killed!
2011/04/15 9:13:40 2AAC6C70 s killing reader yyyy
2011/04/15 9:13:40 2AAC6C70 s thread 2B2CB4B0 killed!
2011/04/15 9:13:40 2AAC6C70 s killing reader eeee
2011/04/15 9:13:41 2B1CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:41 2B1CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:41 2B1CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:41 2B1CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:41 2B1CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:41 2B1CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:41 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (yyy,xxx.xxx.xxx.xxx)
2011/04/15 9:13:41 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:41 2AAC6C70 s thread 2B3CB4B0 killed!
2011/04/15 9:13:41 2AAC6C70 s killing reader oooo
2011/04/15 9:13:41 2B3CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:41 2B3CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:41 2B3CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:41 2B3CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:41 2B3CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:41 2B3CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:41 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (ooooo,xxx.xxx.xxx.xxx)
2011/04/15 9:13:41 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:41 2AAC6C70 s thread 2B4CB4B0 killed!
2011/04/15 9:13:41 2AAC6C70 s killing reader dvb
2011/04/15 9:13:42 2B4CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:42 2B4CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:42 2B4CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:42 2B4CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:42 2B4CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:42 2B4CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:42 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (dvb,xxx.xxx.xxx.xxx)
2011/04/15 9:13:42 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:42 2AAC6C70 s thread 2B5CB4B0 killed!
2011/04/15 9:13:42 2AAC6C70 s killing reader rrrrr
2011/04/15 9:13:42 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (rrrrr,xxx.xxx.xxx.xxx)
2011/04/15 9:13:42 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:42 2AAC6C70 s thread 2B6CB4B0 killed!
2011/04/15 9:13:42 2AAC6C70 s killing reader xxxxxx
2011/04/15 9:13:42 2AAC6C70 s thread 2B7CB4B0 killed!
2011/04/15 9:13:42 2AAC6C70 s killing reader zzzzzz
2011/04/15 9:13:43 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (zzzz,xxx.xxx.xxx.xxxx)
2011/04/15 9:13:43 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:43 2AAC6C70 s thread 2B8DB4B0 killed!
2011/04/15 9:13:43 2AAC6C70 s killing reader share
2011/04/15 9:13:43 2B6CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:43 2B6CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:43 2B6CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 569.
2011/04/15 9:13:43 2B6CB4B0 p Found a try to add garbage twice. Not adding the element to garbage list...
2011/04/15 9:13:43 2B6CB4B0 p Current garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:43 2B6CB4B0 p Original garbage addition: /home/nighti/oscam-svn/oscam.c, line 573.
2011/04/15 9:13:43 2AAC6C70 s A thread didn't cleanup itself. Forcing cleanup for type p (share,xxx.xxx.xxx.xxx)
2011/04/15 9:13:43 2AAC6C70 s FATAL ERROR: could not find client to remove from list.
2011/04/15 9:13:43 2AAC6C70 s thread 2B9DB4B0 killed!
2011/04/15 9:13:43 2AAC6C70 s killing reader xxxxxx
2011/04/15 9:13:44 2AAC6C70 s thread 2BADB4B0 killed!
2011/04/15 9:13:44 2AAC6C70 s killing reader xxxxx
2011/04/15 9:13:44 2AAC6C70 s thread 2BBDB4B0 killed!
2011/04/15 9:13:44 2AAC6C70 s userdb 11 accounts freed

It says a lot of errors! So i guess that makes the oscam to crash!
Any comment?

comment:24 by DimitarCC, 13 years ago

if still need my config please say i will upload it!

in reply to:  22 ; comment:25 by alno, 13 years ago

Replying to spock:

It's working for me too now. However I have to wait like 10-15 seconds more then usual after pushing the restart button until it's back up again.

rename your oscam.srvid and check again

in reply to:  25 comment:26 by DimitarCC, 13 years ago

Replying to alno:

Replying to spock:

It's working for me too now. However I have to wait like 10-15 seconds more then usual after pushing the restart button until it's back up again.

rename your oscam.srvid and check again

I dont have srvid file at all but it crash anyway!

comment:27 by alno, 13 years ago

my reply was to spock who complain about long startup. There are some oscam.srvid (created with script from cccam.channelinfo) with more then 10000 entries in suboptimal format. It needs very long time to read this file and CPU starts cooking

comment:28 by spock, 13 years ago

It's fine running without oscam.srvid indeed. My oscam.srvid has not changed for well over a month though - and these issues did not show up until somewhere around rev4950. I noticed the changes made lately so I guess this is just a side effect of having all the extra (parsing) cccam info in the webif displayed. Perhaps there could be a switch to disable advanced cccam information for those who want. I prefer to keep it this way though, I'll just trim down my srvid file instead of using the bloated one I'm currently using.

And I'm not complaining here, just reporting what I see in hope of helping. Devs are the ones to choose what to do with user input.

Last edited 13 years ago by spock (previous) (diff)

comment:29 by Deas, 13 years ago

how many lines are in your oscam.srvid? how is the structure of this file? 0001:000d|...|.... or 0001,0002,0003:000d|...|....?

http://www.streamboard.tv/wiki/index.php/Srvid

in reply to:  29 comment:30 by spock, 13 years ago

Replying to Deas:

how many lines are in your oscam.srvid? how is the structure of this file? 0001:000d|...|.... or 0001,0002,0003:000d|...|....?

http://www.streamboard.tv/wiki/index.php/Srvid

My srvid is quite large, pretty much every channel on the major european satellites. And not so well optimized as it could be. Anyway I think this is a bit OT for this ticket now? The (now, _slow_ restart) problem (for me) is obviously my bloated srvid file, and as I wrote previously I'm gonna trim it down as much as I can.

As far as I'm concerned I think this ticket could be closed.

Last edited 13 years ago by spock (previous) (diff)

comment:31 by DimitarCC, 13 years ago

Well but as far i am concerned the ticked should be stay open since my oscam crashes still on webif restart! I was attach log in upper post!

in reply to:  31 comment:32 by alno, 13 years ago

Replying to DimitarCC:

Well but as far i am concerned the ticked should be stay open since my oscam crashes still on webif restart! I was attach log in upper post!

We leave it open - no fear - your debuglog is the first qualified Log in this issue! Many thanks for

@spock: have a look into wiki: http://www.streamboard.tv/wiki/index.php/Srvid There are well organized and optimized lists. Please only put in your file the channels you need - otherwise ECM Time grows up. If you have new optimized stuff please add it to wiki. Using the generated lists from cccam.channellist is the worst choice and slow down the whole oscam (as much as more requests oscam handle)

comment:33 by Admin, 13 years ago

This looks really interesting. Are these all cccam readers who fail? Your internal readers and clients seem to be fine?
Could you try to change line 574 in oscam.c from cl->cleaned++ to cl->cleaned=1;

comment:34 by DimitarCC, 13 years ago

Unfortunately i dont have an environment for build oscam by my own. Since i am use windows PC and i i am not so good at linux programming. If you can build me a test version of that i can test it! And yes that is all my cccam readers. no exception. i have one newcamd reader that not says error on restart. But i can see error in my internal reader also
2011/04/15 9:13:39 2B0CB4B0 r ERROR, function call ioctl(reader->handle, IOCTL_SET_DEACTIVATE)<0 returns error.
Is that problem?
But all readers including internal one work with no problem untill restart oscam from webif. That errors only show up won restart. And in before versions of oscam prior 4947 there was not such a problems!

Last edited 13 years ago by DimitarCC (previous) (diff)

comment:35 by DimitarCC, 13 years ago

OK i was try the last rev [5015]. now on restart from webif i dont have crash anymore.
in the log just stays that error
2011/04/15 13:49:40 2B0CB4B0 r ERROR, function call ioctl(reader->handle, IOCTL_SET_DEACTIVATE)<0 returns error.
2011/04/15 13:49:40 2B0CB4B0 r ERROR, function call Sci_Deactivate(reader) returns error.

Last edited 13 years ago by DimitarCC (previous) (diff)

comment:36 by Admin, 13 years ago

Resolution: fixed
Status: reopenedclosed

This is more a cosmetical problem and happens on some receivers where closing isn't allowed/necessary. As long as your device gets correctly reopened upon restart this is no problem. As the original issue was resolved I close this now.

Last edited 13 years ago by Admin (previous) (diff)
Note: See TracTickets for help on using tickets.