Mailing List Archive

OS X frontend "exiting unexpectedly"
I recently started using mythtv on a new mac mini. It works great, but
whenever I exit OS X pops up a dialog saying it "exited unexpectedly" and
asking to either report or ignore. As I had just asked it to exit, it
certainly wasn't unexpected to me :), so I always click ignore.

I guess the mythfrontend exit code doesn't do quite what Apple thinks it
should do? Any hints on how to make OS X stop bugging me every time I
exit mythtv?

Thanks much...

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Sat, 2023-10-14 at 18:07 -0700, Paul B. Henson wrote:
> I recently started using mythtv on a new mac mini. It works great,
> but
> whenever I exit OS X pops up a dialog saying it "exited unexpectedly"
> and
> asking to either report or ignore. As I had just asked it to exit, it
> certainly wasn't unexpected to me :), so I always click ignore.
>
> I guess the mythfrontend exit code doesn't do quite what Apple thinks
> it
> should do? Any hints on how to make OS X stop bugging me every time I
> exit mythtv?

Paul are you using the spin done by John Hoyt?
John did endless hard work to make it all work BUT apples ecosystem is
Bigger-than-Ben-Hur. Eventually I installed linux on my beautiful
imac27 (mid 2011) that apple said go-hops about, that works well. It is
not an option on a new mac-mini (apple silicon). The tilt-tell-apple ?
exit dialog is(was) an ongoing annoyance. Unless John can dream-up a
fix, and not having a team of apple experts (who want to solve the
problem) to quote from "Back to the Future" "get used to the bars kid"
James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Sat, Oct 14, 2023 at 9:07?PM Paul B. Henson <henson@acm.org> wrote:

> I recently started using mythtv on a new mac mini. It works great, but
> whenever I exit OS X pops up a dialog saying it "exited unexpectedly" and
> asking to either report or ignore. As I had just asked it to exit, it
> certainly wasn't unexpected to me :), so I always click ignore.
>
> I guess the mythfrontend exit code doesn't do quite what Apple thinks it
> should do? Any hints on how to make OS X stop bugging me every time I
> exit mythtv?
>
> Thanks much...
>

Hi Paul, I experience the same issues on occasion (more often on my M1 mini
than my intel based computers). I've been negligent in trying to run it
down. Any chance you can provide some additional details?

I'm assuming (possibly incorrectly) you're using one of the builds posted
on SourceForge? If so. which build? What version of mythtv (v32, v33,
v34/master)? What version of macOS are you running? Intel or Arm64?

Any chance you can also add any info from the "crash report" - hit report
instead of ignore :) ? I suspect (without any valid basis and much
speculation) that there's a upnp closeout issue on arm64; the crash
report would help point to the dylib that's related to the crash.

Thanks!
John
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On 15/10/2023 02:07, Paul B. Henson wrote:
> I recently started using mythtv on a new mac mini. It works great, but
> whenever I exit OS X pops up a dialog saying it "exited unexpectedly" and
> asking to either report or ignore. As I had just asked it to exit, it
> certainly wasn't unexpected to me :), so I always click ignore.
>
> I guess the mythfrontend exit code doesn't do quite what Apple thinks it
> should do? Any hints on how to make OS X stop bugging me every time I
> exit mythtv?
>
> Thanks much...
>
I am using Debian on a plain Intel mini-ITX and I have to say that what you experience might not be
entirely an Apple fault.

This is on a clean install of Debian 12 (bookworm) running nothing but openbox and mythtv-frontend
from deb-multimedia.

What I get, and only sometimes, is a hang during shutdown with something like the following message:

stopping session-1.scope

and then a countdown clock indicating an infinite time remaining.

Trying to find a reason for this and plowing through the googles leads me to systemd and a new
feature in either bookworm or systemd whereby shutdown (via this systemd .scope thing I never
noticed before) requires an /exact/ termination request (I forget which) to be accepted by the
process. Previously systemd would accept a number of other SIG values but not any more. Maybe iOS
does the same?

--

Mike Perkins


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On 15/10/2023 11:03, Mike Perkins wrote:

> On 15/10/2023 02:07, Paul B. Henson wrote:
>> I recently started using mythtv on a new mac mini. It works great, but
>> whenever I exit OS X pops up a dialog saying it "exited unexpectedly"
>> and
>> asking to either report or ignore. As I had just asked it to exit, it
>> certainly wasn't unexpected to me :), so I always click ignore.
>>
>> I guess the mythfrontend exit code doesn't do quite what Apple thinks it
>> should do? Any hints on how to make OS X stop bugging me every time I
>> exit mythtv?
>>
>> Thanks much...
>>
> I am using Debian on a plain Intel mini-ITX and I have to say that
> what you experience might not be entirely an Apple fault.
>
> This is on a clean install of Debian 12 (bookworm) running nothing but
> openbox and mythtv-frontend from deb-multimedia.
>
> What I get, and only sometimes, is a hang during shutdown with
> something like the following message:
>
> stopping session-1.scope
>
> and then a countdown clock indicating an infinite time remaining.
>
> Trying to find a reason for this and plowing through the googles leads
> me to systemd and a new feature in either bookworm or systemd whereby
> shutdown (via this systemd .scope thing I never noticed before)
> requires an /exact/ termination request (I forget which) to be
> accepted by the process. Previously systemd would accept a number of
> other SIG values but not any more. Maybe iOS does the same?
>

I just recently built master from source and also noticed a problem with
the frontend process not shutting down cleanly. In may case it appeared
to be an abort which on Ubuntu causes a crash report to be generated
which causes a further delay in shutting down the FE while the crash
report is generated. We no longer use it so didn't bother to debug
further but it was reproducible every time the FE was run. These sort of
problems are nothing new it used to be the BE that failed to shutdown
cleanly now it's the FE :(


Paul H.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Sun, Oct 15, 2023 at 10:44?AM Paul Harrison <mythtv@mythqml.net> wrote:

> These sort of
> problems are nothing new it used to be the BE that failed to shutdown
> cleanly now it's the FE :(

It is the law of conservation of bugs (when one bug
is squashed, at least one more appears; whac-a-mole).
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On 15/10/2023 11:42, Paul Harrison wrote:

> I just recently built master from source and also noticed a problem
> with the frontend process not shutting down cleanly. In may case it
> appeared to be an abort which on Ubuntu causes a crash report to be
> generated which causes a further delay in shutting down the FE while
> the crash report is generated. We no longer use it so didn't bother to
> debug further but it was reproducible every time the FE was run. These
> sort of problems are nothing new it used to be the BE that failed to
> shutdown cleanly now it's the FE :(
>

I just tried again twice, this time under gdb and got two different
aborts both involving destructing const QString's by the look of it.
This is the bt of the second one in case anyone is interested.

.Thread 1 "mythfrontend" received signal SIGABRT, Aborted.
__pthread_kill_implementation(no_tid=0, signo=6, threadid=<optimised
out>) at ./nptl/pthread_kill.c:44
Download failed: Invalid argument.  Continuing without source file
./nptl/./nptl/pthread_kill.c.
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation(no_tid=0, signo=6, threadid=<optimised
out>) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal(signo=6, threadid=<optimised out>) at
./nptl/pthread_kill.c:78
#2 __GI___pthread_kill(threadid=<optimised out>, signo=signo@entry=6) at
./nptl/pthread_kill.c:89
#3 0x00007ffff123c3b6in __GI_raise(sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#4 0x00007ffff122287cin __GI_abort() at ./stdlib/abort.c:79
#5 0x00007ffff12235a4in __libc_message(fmt=fmt@entry=0x7ffff13b890f
"%s\n") at ../sysdeps/posix/libc_fatal.c:150
#6 0x00007ffff129b677in malloc_printerr(str=str@entry=0x7ffff13bb848
"corrupted size vs. prev_size while consolidating") at
./malloc/malloc.c:5651
#7 0x00007ffff129d888in _int_free(av=0x7ffff13f6c80 <main_arena>,
p=0x555556337b40, have_lock=<optimised out>) at ./malloc/malloc.c:4592
#8 0x00007ffff129fca3in __GI___libc_free(mem=<optimised out>) at
./malloc/malloc.c:3367
#9 0x00007ffff6a66f0ain QTypedArrayData<unsigned
short>::deallocate(QArrayData*)(data=0x555556337b70) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qarraydata.h:239
#10 0x00007ffff6a666d7in QString::~QString()(this=0x7ffff6da6158
<Parse::kMythRSS>, __in_chrg=<optimised out>) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1311
#11 0x00007ffff123e566in __cxa_finalize(d=0x7ffff6da0da0) at
./stdlib/cxa_finalize.c:82
#12 0x00007ffff6a64b77in __do_global_dtors_aux() at
/lib/libmythbase-34.so.34
#13 0x00007ffff7fc0ba0in  ()
#14 0x00007ffff7fc90e2in _dl_call_fini(closure_map=0x7fffffffcfe0,
closure_map@entry=0x7ffff7fc0ba0) at ./elf/dl-call_fini.c:43
#15 0x00007ffff7fcd1a8in _dl_fini() at ./elf/dl-fini.c:114
#16 0x00007ffff123eb95in __run_exit_handlers(status=0,
listp=0x7ffff13f6840 <__exit_funcs>,
run_list_atexit=run_list_atexit@entry=true,
run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:111
#17 0x00007ffff123ecd0in __GI_exit(status=<optimised out>) at
./stdlib/exit.c:141
#18 0x00007ffff1223a97in
__libc_start_call_main(main=main@entry=0x5555555d4842 <main(int,
char**)>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdce8) at
../sysdeps/nptl/libc_start_call_main.h:74
#19 0x00007ffff1223b49in __libc_start_main_impl(main=0x5555555d4842
<main(int, char**)>, argc=1, argv=0x7fffffffdce8, init=<optimised out>,
fini=<optimised out>, rtld_fini=<optimised out>,
stack_end=0x7fffffffdcd8) at ../csu/libc-start.c:360
#20 0x00005555555c7ae5in _start()

The first one involved const QString ProgramInfo::kFromRecordedQuery?


Paul H.
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
> On 15 Oct 2023, at 11:41 pm, Gary Buhrmaster <gary.buhrmaster@gmail.com> wrote:
>
>>
>> These sort of
>> problems are nothing new it used to be the BE that failed to shutdown
>> cleanly now it's the FE :(
>
> It is the law of conservation of bugs (when one bug
> is squashed, at least one more appears; whac-a-mole).

To put context
v32 built from source on amd64 linux segfaults on exit so seldom that I can't recall if I've ever seen it
v32 from John's build on Sourceforge on Monterey segfaults every week or so. I'll post when it next does.
James
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Sun, Oct 15, 2023 at 10:26:21AM +0800, jam wrote:

> Paul are you using the spin done by John Hoyt?

I'm using the ones linked to from the wiki:

https://www.mythtv.org/wiki/MythTV_on_Mac_OS_X#Pre-built_Downloads

Specifically this one:

https://sourceforge.net/projects/mythtvformacosx/files/v32/macOS%2013%20Ventura/ARM64/

> imac27 (mid 2011) that apple said go-hops about, that works well. It is
> not an option on a new mac-mini (apple silicon).

Particularly not this one, as it's my wife's mac mini :).

Thanks...

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Sun, Oct 15, 2023 at 12:02:29AM -0400, John Hoyt wrote:

> I'm assuming (possibly incorrectly) you're using one of the builds posted
> on SourceForge? If so. which build? What version of mythtv (v32, v33,
> v34/master)? What version of macOS are you running? Intel or Arm64?

Yes, I'm using this one:

https://sourceforge.net/projects/mythtvformacosx/files/v32/macOS%2013%20Ventura/ARM64/

It's on the latest version of Ventura, I haven't updated to Sonoma yet.l

> Any chance you can also add any info from the "crash report" - hit report
> instead of ignore :) ?

Sure, it says:

Process: mythfrontend [715]
Path: /Applications/mythfrontend.app/Contents/MacOS/mythfrontend
Identifier: mythfrontend
Version: ???
Code Type: ARM-64 (Native)
Parent Process: Exited process [704]
User ID: 501

Date/Time: 2023-10-23 12:38:11.4524 -0700
OS Version: macOS 13.5.2 (22G91)
Report Version: 12
Anonymous UUID: 65B71DDC-B21F-07F6-8277-004AF7DBA3C5


Time Awake Since Boot: 84 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000

VM Region Info: 0 is not in any region. Bytes before following region: 4310040576
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 100e60000-1011a4000 [ 3344K] r-x/r-x SM=COW .../mythfrontend

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x106b5da58 0x106b54000 + 39512
1 QtCore 0x106bbf5fc QString::operator=(QString const&) + 32
2 mythfrontend 0x100f85300 ExitPrompter::~ExitPrompter() + 64
3 QtWidgets 0x105fb9c88 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 236
4 QtWidgets 0x105fbaaf8 QApplication::notify(QObject*, QEvent*) + 516
5 QtCore 0x106c7721c QCoreApplication::notifyInternal2(QObject*, QEvent*) + 180
6 QtCore 0x106c77f2c QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 516
7 QtCore 0x106c7772c QCoreApplication::exec() + 148
8 mythfrontend 0x100e772b0 main + 18680

Thanks much...

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Mon, Oct 23, 2023 at 4:43?PM Paul B. Henson <henson@acm.org> wrote:

>
> Yes, I'm using this one:
>
>
> https://sourceforge.net/projects/mythtvformacosx/files/v32/macOS%2013%20Ventura/ARM64/


Thanks - looks like you're running v32 which will give me some difficulty
to reproduce (I upgraded my backend to v33). But given the crash report
you post below, it does appear to be a QSting related issue like what Paul
H. is seeing in master. There's a chance this crash is related. These two
lines in the crash report at least point to something QString related.

0 QtCore 0x106b5da58 0x106b54000 +
39512

1 QtCore 0x106bbf5fc
QString::operator=(QString const&) + 32


I'll have to roll a debug version of the application to look deeper;
hopefully I will have a little spare time to do that this weekend.

Paul H,

Have you started a github Issue for the bug you found?

~John
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Mon, Oct 23, 2023 at 07:15:31PM -0400, John Hoyt wrote:

> Thanks - looks like you're running v32 which will give me some difficulty
> to reproduce (I upgraded my backend to v33). But given the crash report

Oops, I think I misremembered the version; I double checked my backend
and that is indeed running v33, so I most likely installed the same for
the os x frontend. I'll confirm when I get back to it.

> Have you started a github Issue for the bug you found?

No, I didn't; sorry. I will once I get home and check the os x frontend
version.

Thanks much...
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
I'm leaning towards this being a related (or the same issue) to the one
Paul Harrison mentioned earlier in this thread.

James kindly kicked out a core dump log and the culprit seems to be QString
here too. A snippet from James' core dump:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtCore 0x10a271a58 0x10a268000 + 39512
1 QtCore 0x10a2d35fc
QString::operator=(QString const&) + 32
2 mythfrontend 0x104295300
ExitPrompter::~ExitPrompter() + 64

I've been unable to reproduce locally with a debug build (which means I
can't get lldb to help find the true culprit), but got a similar core dump
on a non-debuild.

Paul Harrison - what version of QT did you build / run against?
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On 15/11/2023 00:23, John Hoyt wrote:

> I'm leaning towards this being a related (or the same issue) to the
> one Paul Harrison mentioned earlier in this thread.
>
> James kindly kicked out a core dump log and the culprit seems to be
> QString here too. A snippet from James' core dump:
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0 QtCore 0x10a271a58 0x10a268000 + 39512
> 1 QtCore 0x10a2d35fc QString::operator=(QString const&) + 32
> 2 mythfrontend 0x104295300 ExitPrompter::~ExitPrompter() + 64
>
> I've been unable to reproduce locally with a debug build (which means
> I can't get lldb to help find the true culprit), but got a similar
> core dump on a non-debuild.
>
> Paul Harrison - what version of QT did you build / run against?
>

I think it was Qt 5.15.10 at least that is what I have installed now.
Just rebuilt with current master to try again but unfortunately there
must have been a DB schema change so the FE refuses to start up but at
least it doesn't crash :)


Paul H.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
On Tue, Nov 14, 2023 at 7:56?PM Paul Harrison <mythtv@mythqml.net> wrote:

> On 15/11/2023 00:23, John Hoyt wrote:
>
> > I'm leaning towards this being a related (or the same issue) to the
> > one Paul Harrison mentioned earlier in this thread.
> >
> > James kindly kicked out a core dump log and the culprit seems to be
> > QString here too. A snippet from James' core dump:
> >
> > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> > 0 QtCore 0x10a271a58
> 0x10a268000 + 39512
> > 1 QtCore 0x10a2d35fc
> QString::operator=(QString const&) + 32
> > 2 mythfrontend 0x104295300
> ExitPrompter::~ExitPrompter() + 64
> >
> > I've been unable to reproduce locally with a debug build (which means
> > I can't get lldb to help find the true culprit), but got a similar
> > core dump on a non-debuild.
> >
> > Paul Harrison - what version of QT did you build / run against?
> >
>
> I think it was Qt 5.15.10 at least that is what I have installed now.
> Just rebuilt with current master to try again but unfortunately there
> must have been a DB schema change so the FE refuses to start up but at
> least it doesn't crash :)
>

Thanks! The macOS versions are likely on the same version of Qt or
5.15.11. I've started to github issue here:
https://github.com/MythTV/mythtv/issues/816

QT problems are beyond my skill set, but I'll be happy to help a dev
troubleshoot.
Re: OS X frontend "exiting unexpectedly" [ In reply to ]
> On Jan 14, 2024, at 21:32, John Hoyt <john.hoyt@gmail.com> wrote:
>
> Is anyone still experiencing the segfault on exit?
>
> I haven't since upgrading my systems to Sonoma.
>
> Klaus was kindly looking into the issue, but needs the valgrind output: https://github.com/MythTV/mythtv/issues/816#issuecomment-1890771902
>
> Valgrind is available in both macports
> sudo port install valgrind-macos-devel

No cigar, but lots of stuff to keep me busy so i’ve not done any troubleshooting

Sonoma

[mist] /Users/jam [502]% /Applications/mythfrontend.app/Contents/MacOS/mythfrontend --version
Please attach all output as a file in bug reports.
MythTV Version : v34-Pre-523-g25ed0edc06
MythTV Branch : master
Network Protocol : 91
Library API : 34.20220913-1
QT Version : 5.15.11
Options compiled in:
profile using_backend using_bdjava using_bindings_perl using_bindings_python using_bindings_php using_darwin using_frontend using_hdhomerun using_satip using_vbox using_ceton using_libcrypto using_gnutls using_libdns_sd using_libxml2 using_mheg using_opengl using_qtdbus using_sqlite3 using_taglib using_system_libbluray using_appleremote using_bdjava using_bindings_perl using_bindings_python using_bindings_php using_fontconfig using_freetype2 using_mythtranscode using_opengl using_videotoolbox using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame

The venturra build often segfaults

James

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org