Opened 15 years ago
Closed 15 years ago
Last modified 15 years ago
#9421 closed Developer Task (fixed)
MythSystem Rewrite bug tracking
| Reported by: | beirdo | Owned by: | beirdo |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.25 |
| Component: | MythTV - MythSystem | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
I am opening this ticket for bug reporting on the new MythSystem setup. Rather than opening many tickets, maybe it might work better if we track any issues here.
Please, as usual: No me toos. If you have an issue to report that has not already been reported, adding it is OK. If you have comments on a previous issue that has been reported, please put your comments in the mailing lists. I don't want to have to be locking this ticket due to bad behavior. Thanks.
Attachments (19)
Change History (50)
comment:1 by , 15 years ago
by , 15 years ago
| Attachment: | 0001-Make-background-runs-not-block-the-foreground.patch added |
|---|
follow-up: 11 comment:2 by , 15 years ago
Please download the attached patch and apply it with "git apply patchfilename". Let me know if this fixes the issue or not. Also, when running, you will need -v system,extra for most of the logging to show up.
comment:3 by , 15 years ago
In 20009dcd4d31152b330573d718859317a447b464:
Change DBUtil::CountClients() to use MSqlQuery.
No need to use the mysql command-line client, anymore. Refs #9421.
by , 15 years ago
| Attachment: | mythweb.segfault.data added |
|---|
--version, gdb and backend log for segfault when using mythweb + MiscStatusScript
comment:4 by , 15 years ago
I forgot to add a 'how to duplicate' section to the mythweb.segfault.data attachment.
Create a script and point MiscStatusScript to it via the GUI Restart apache Start mythbackend -v general,important,system,extra (with gdb) Browse to hostname/mythweb/status Expect 'headers only' on the status page and at the top: Warning at /var/www/mythweb/modules/status/handler.php, line 31: !!NoTrans: file_get_contents(http://192.168.2.200:6544): failed to open stream: HTTP request failed Expect gdb to trigger on a segfault
This was the most reliable method of recreating the problem. I'll upload the script if needed, it includes a ping -c1 -t4... and the script runs for about 2 seconds. Simply reloading the page isn't reliable.
by , 15 years ago
| Attachment: | 0001-Fix-race-condition-on-m_pMap-read-on-close.patch added |
|---|
comment:5 by , 15 years ago
Bill: could you check with your test script to see if this patch fixes the issue? Thanks.
comment:6 by , 15 years ago
170+ tests with 0001-Fix-race-condition-on-m_pMap-read-on-close.patch applied, 0 failures. Also, existing startup, channel changer, preview generator and pre shutdown programs continue to run as before.
Without the patch, I only did two tests -- both generated a segfault.
Sounds like a fix to me!
Thank you.
comment:7 by , 15 years ago
0001-Fix-race-condition-on-m_pMap-read-on-close.patch committed in 88d17d39c1ef. Thanks.
by , 15 years ago
| Attachment: | netgrabbermanager.patch added |
|---|
comment:8 by , 15 years ago
MythSystem usage in libmyth/netgrabbermanager.cpp leaves MythSystem::d uninitialized, causing a segfault. Patch attached.
by , 15 years ago
| Attachment: | 0001-Fix-no-argument-constructor.patch added |
|---|
comment:9 by , 15 years ago
Jonatan: Please revert that patch and try the one above. The true issue is that the bare constructor didn't initialize correctly anymore.
comment:10 by , 15 years ago
Since Jonathan confirmed on IRC that it is working properly: committed 0001-Fix-no-argument-constructor.patch as SHA1 55661dbf7697
follow-up: 12 comment:11 by , 15 years ago
Replying to beirdo:
Please download the attached patch and apply it with "git apply patchfilename". Let me know if this fixes the issue or not. Also, when running, you will need -v system,extra for most of the logging to show up.
With patch 0001-Make-background-runs-not-block-the-foreground.patch applied on top of current head (?) of git does not properly fix the background process launch from the menu issue. Process is launched into background, but frontend crashes shortly after the process has been launched. This happens both if I'm using the launched process only (Chrome) or if I'm changing frontend as an active process (Alt-Tab) etc.
Following can be seen from the logs:
2011-01-09 15:14:32.912 Adding background flag 2011-01-09 15:14:32.912 Launching: /usr/bin/google-chrome 2011-01-09 15:14:32.918 Managed child (PID: 18341) has started! *& command=/usr/bin/google-chrome, timeout=0
Sometimes also following line can be seen in logs:
2011-01-09 15:13:57.689 Managed child (PID: 18172) timed out, issuing TERM signal
follow-up: 13 comment:12 by , 15 years ago
Replying to otto@…:
OK. Thanks for the update. To further debug this, I will need to see the logs (from the frontend) and also a full backtrace of it when it crashes. It is not possible to debug the real issue without that information. Please don't edit the logs, include everything from at least a minute before you try this (or from starting the frontend) right until it crashes.
Thanks
by , 15 years ago
| Attachment: | frontend-crash-bt.txt added |
|---|
by , 15 years ago
| Attachment: | frontend-crash-log.txt added |
|---|
comment:13 by , 15 years ago
Replying to beirdo:
OK. Thanks for the update. To further debug this, I will need to see the logs (from the frontend) and also a full backtrace of it when it crashes.
Both frontend log and backtrace files attached.
by , 15 years ago
| Attachment: | 0002-Move-timeout-setting-to-before-fork.patch added |
|---|
follow-up: 17 comment:14 by , 15 years ago
Otto: please try this patch in addition to the earlier one.
comment:15 by , 15 years ago
MythSystem rewrite appears to have broken MythXML::GetInternetSources, which means it's no longer possible to configure MythNetvision grabbers since the backend hangs forever without returning a list.
Gets through one of the grabbers and then hangs.
2011-01-09 17:39:08.330 Launching: /usr/share/mythtv//internetcontent/bbciplayer.py -v 2011-01-09 17:39:08.332 Managed child (PID: 16238) has started! * command=/usr/share/mythtv//internetcontent/bbciplayer.py -v, timeout=0 2011-01-09 17:39:08.710 Managed child (PID: 16238) has exited! command=/usr/share/mythtv//internetcontent/bbciplayer.py -v, status=0, result=0
comment:16 by , 15 years ago
GetInternetSources appears okay, actually, something fixed within the last three or four days. Sorry about that.
by , 15 years ago
| Attachment: | frontend-crash-bt2.txt added |
|---|
by , 15 years ago
| Attachment: | frontend-crash-log2.txt added |
|---|
comment:17 by , 15 years ago
Replying to beirdo:
Otto: please try this patch in addition to the earlier one.
Unfortunately still crashes, fresh backtrace & log attached.
by , 15 years ago
| Attachment: | 0003-Don-t-bother-managing-a-child-that-failed.patch added |
|---|
comment:18 by , 15 years ago
Otto: another patch for you. Please apply all three patches together, and give it a try. Thanks for your patience.
by , 15 years ago
| Attachment: | 0001-Changes-to-MythSystemUnix-to-fix-when-a-launched-pro.patch added |
|---|
replaces 0001-0003 for okolsi, rebased onto current master
follow-up: 20 comment:19 by , 15 years ago
Otto: I have posted a single patch which contains all three previous patches, rebased onto master so it will apply correctly after the libmythdb->libmythbase change. Let me know, please.
by , 15 years ago
| Attachment: | frontend-crash-bt3-with-patch.txt added |
|---|
by , 15 years ago
| Attachment: | frontend-crash-log3-with-patch.txt added |
|---|
by , 15 years ago
| Attachment: | frontend-crash-bt4-with-patch.txt added |
|---|
comment:20 by , 15 years ago
Replying to beirdo:
Otto: I have posted a single patch which contains all three previous patches, rebased onto master so it will apply correctly after the libmythdb->libmythbase change. Let me know, please.
Applied the patch, then started xterm with background flag from the menu. That seemed to work and then little bit later started Chrome also with background flag and from the menu. Soon after this frontend segfaulted. I've attached both bt and log. Later tested with only xterm, also segfault this time. Bt attached, looks very similar to the first one.
by , 15 years ago
| Attachment: | playback-startup-bt.txt added |
|---|
comment:21 by , 15 years ago
Attached yet another backtrace. This is from recording playback startup and with different frontend. This fe does not have the above patch applied, otherwise it's up-to-date with most recent sources. Might be something else, but looks like there's MythSystem involved..
by , 15 years ago
| Attachment: | 0002-In-myth_system-use-the-updated-settings.patch added |
|---|
comment:22 by , 15 years ago
Otto: thanks once again for your patience. I hope this last patch (apply with the reworked one above) will get the last remaining issue there. The bug seems to be specific to when the & is at the end of the command string, and the updated settings weren't being honored, causing the instance to be deleted while we were still tracking it.
comment:23 by , 15 years ago
Otto: actually, these patches are now on master, so just git pull and try, please. Thanks :)
comment:25 by , 15 years ago
Excellent. I will leave this open until Feb 14 for further findings, at which point if nothing new has been found, I will close it.
by , 15 years ago
| Attachment: | playback-startup-bt2.txt added |
|---|
comment:26 by , 15 years ago
I actually had a report of nearly precisely the same thing last night, otherwise I'd need log files as well. A patch to test is attached next.
by , 15 years ago
| Attachment: | 0001-Change-to-using-QPointer-so-double-delete-issues-sto.patch added |
|---|
comment:28 by , 15 years ago
| Milestone: | unknown → 0.25 |
|---|---|
| Resolution: | → Fixed |
| Status: | new → closed |
Have a lovely Valentine's Day... Closing this ticket now. If you have any further issues that seem to be attributable to the myth_system changes, please create a new ticket.
comment:29 by , 15 years ago
Change DBUtil::CountClients() to use MSqlQuery.
No need to use the mysql command-line client, anymore. Refs #9421.
Changeset: 20009dcd4d31152b330573d718859317a447b464
comment:30 by , 15 years ago
Make DBUtil::CountClients() a bit more portable.
Updates the approach used by 20009dcd4d31152b330573d718859317a447b464 to work with all supported versions of MySQL. INFORMATION_SCHEMA.PROCESSLIST was added in MySQL 5.1.7, so use SHOW PROCESSLIST, instead. Thanks to Gavin Hurlbut for noticing. Refs #9421.
Changeset: 52cef7b1ae94c22c9c5b1a79f95c5afc4d48db9f
comment:31 by , 15 years ago
| Resolution: | Fixed → fixed |
|---|
Changes to MythSystemUnix to fix when a launched program dies quickly
This hopefully will fix #9421 (first report).
Make background runs not block the foreground
The problem with running in the background in from the menu XML is that it is blocking the drawing, inputdevs, etc, and then launching in the background. If in the background, there is no reason I can think of that we need to block the UI thread. If the program launched in the background has focus, it should be receiving the keyboard input. The only one think I'm wondering is if LIRC will act oddly.
Move timeout setting to before fork
Don't bother managing a child that failed
If the child quickly failed (i.e. errored on start), there is an apparent race condition that makes it look like the child timed out, and if it was run in the background, it's deleted before the manager thread gets it, so we core dump when we try to remove it.
Changeset: b8ff1e2b92ed6c23ced6f9d622d74c7016688ef6

Executing background processes from the menu using following XML does not work:
<button> <type>WEBPAGE</type> <text>Chrome</text> <action>EXEC /usr/bin/google-chrome &</action> <depends>mythbrowser</depends> </button>Problematic part seems to be putting process into background using &. Without it EXEC works as expected. It seems that -v system logging is also not working while this problem happens.