Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


mythtv at cvs

Nov 16, 2009, 8:00 AM

Post #1 of 8 (1280 views)
Permalink
Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Mlocked: 0
------------------------------------------------+---------------------------
In all versions of MythBackend, running on OSX 10.6 (Snow Leopard),
MythBackend crashes at startup with a message in Console about closing
random unix handles.

In main.cpp, in the routine main, the following lines are the cause of the
problem.

for (int i = 3; i < sysconf(_SC_OPEN_MAX) - 1; ++i)
close(i);

These are apparently benign in 10.5 (Leopard) but fatal in 10.6. They
should be #ifdef'd away for 10.6 or OSX in general.

MythTV Version : 22791M
MythTV Branch : branches/release-0-22-fixes
Network Protocol : 50
Library API : 0.22.20091023-1
QT Version : 4.5.3
Options compiled in:
release darwin_da using_corevideo using_backend using_darwin
using_firewire using_frontend using_hdhomerun using_hdpvr using_iptv
using_lirc using_mheg using_opengl_video using_qtwebkit using_appleremote
using_bindings_perl using_bindings_python using_darwin_da using_opengl
using_ffmpeg_threads using_live using_mheg

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Nov 23, 2009, 9:05 PM

Post #2 of 8 (1184 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Mlocked: 0
------------------------------------------------+---------------------------

Comment(by Graham.Dumpleton@…):

Have attached actual crash log to show this is a real issue. The error
message is:

BUG IN CLIENT OF LIBDISPATCH: Do not close random Unix descriptors

This appears to be coming out of Grand Central Dispatch.

http://libdispatch.macosforge.org/trac/browser/trunk/src/queue.c?rev=2#L1893

http://libdispatch.macosforge.org/

The nature of the error seems to imply that direct or indirect linking of
Grand Central Dispatch must cause some back ground task to run
automatically and the close() loop in MythTV is closing some special file
descriptor it is monitoring and causing fatal crash.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:1>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Nov 29, 2009, 2:10 PM

Post #3 of 8 (1146 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Mlocked: 0
------------------------------------------------+---------------------------

Comment(by Graham.Dumpleton@…):

An anonymous poster over on ServerFault gave this answer in relation to
this issue:

"""The bug is in MythTV. The command-line argument parsing is apparently
causing GCD to be started as a side-effect. The solution is simple. Move
the "for ()" loop that closes all the descriptors to the very top of
main()."""

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 9, 2010, 9:58 PM

Post #4 of 8 (1029 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: assigned
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Mlocked: 0
------------------------------------------------+---------------------------
Changes (by nigel):

* status: new => assigned


Comment:

Hi Graham. Sorry for the delay in working on this - not much time around
Xmas. (Though, I don't use your OSE much any more, so I should have plenty
of time :-)
[[BR]]
Your suspicion is correct. Closing file handle 3 causes the crash. I'm
still working out the best fix - anonymous' suggestion does not work for
me - changing the loop to start from 4 on Mac OS X may be easiest?

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:3>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 9, 2010, 10:07 PM

Post #5 of 8 (1020 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: assigned
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Mlocked: 0
------------------------------------------------+---------------------------

Comment(by Jeff Gibbons <mythtv@…>):

Pardon my ignorance but why are the handles being closed this way in the
first place?

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:4>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 9, 2010, 10:55 PM

Post #6 of 8 (1017 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: closed
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Resolution: fixed
Mlocked: 0 |
------------------------------------------------+---------------------------
Changes (by nigel):

* status: assigned => closed
* resolution: => fixed


Comment:

(In [23099]) Work around Mac OS X 10.6 problem - file handle 3 is used,
and there is no easy
way to check if libdispatch is linked in, so just skip handle 3. Closes
#7582.
Thanks to Jeff for the original report and troubleshooting.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:5>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 12, 2010, 2:51 PM

Post #7 of 8 (949 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: closed
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Resolution: fixed
Mlocked: 0 |
------------------------------------------------+---------------------------

Comment(by Brian K Boonstra <(myth) (at) (boonstra.org)>):

Replying to [comment:5 nigel]:
> (In [23099]) Work around Mac OS X 10.6 problem - file handle 3 is used,
and there is no easy
> way to check if libdispatch is linked in, so just skip handle 3. Closes
#7582.


Can we get this into 0.22-fixes also?

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:6>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Jan 14, 2010, 11:04 PM

Post #8 of 8 (893 views)
Permalink
Re: Ticket #7582: OSX 10.6 MythBackend fatal closing random unix handles [In reply to]

#7582: OSX 10.6 MythBackend fatal closing random unix handles
------------------------------------------------+---------------------------
Reporter: Jeff Gibbons <mythtv@…> | Owner: nigel
Type: defect | Status: closed
Priority: minor | Milestone: unknown
Component: Ports - OSX | Version: 0.22
Severity: high | Resolution: fixed
Mlocked: 0 |
------------------------------------------------+---------------------------

Comment(by nigel):

(In [23140]) Backport [23099] from trunk. Work around Mac OS X 10.6
problem -
file handle 3 is used, and there is no easy way to check if
libdispatch is linked in, so just skip handle 3. Refs #7582.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7582#comment:7>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.