Opened 8 years ago

Last modified 3 years ago

#6803 assigned bug

VLC crashes on exit (topological_sort) .. and other apps with add-ons?

Reported by: korli Owned by: bonefish
Priority: normal Milestone: R1
Component: System/runtime_loader Version: R1/Development
Keywords: Cc:
Blocked By: #10968 Blocking: #7368, #12070
Has a Patch: no Platform: All


Thread 14049 caused an exception: Segment violation
[Switching to team /boot/apps/vlc-0.8.6d/VLC media player (14049) thread VLC media player (14049)]
0x00104647 in topological_sort () from /boot/system/runtime_loader
(gdb) bt
#0  0x00104647 in topological_sort () from /boot/system/runtime_loader
#1  0x001053b4 in get_sorted_image_list () from /boot/system/runtime_loader
#2  0x001017f0 in terminate_program () from /boot/system/runtime_loader
#3  0x00f4ef40 in exit () from /boot/system/lib/
#4  0x002633e2 in _start ()
#5  0x00105d56 in runtime_loader () from /boot/system/runtime_loader
#6  0x7ffeefec in ?? ()

VLC 0.8.6d hrev39344

Change History (14)

comment:1 Changed 8 years ago by korli

Resolution: invalid
Status: newclosed

Can't reproduce.

comment:2 Changed 8 years ago by diver

Resolution: invalid
Status: closedreopened
Version: R1/alpha2R1/Development

You can reproduce it after deleting ~/config/settings/VideoLAN Client/cache/plugin-04041e.dat file.

comment:3 Changed 8 years ago by diver

Component: - GeneralSystem/runtime_loader

This issue is introduced in hrev39306.

comment:4 Changed 8 years ago by bonefish

A possible cause could be concurrent modification of the image list by another thread (e.g. by unloading of an add-on). Enclosing the function body in rld_lock() ... rld_unlock() might solve the issue in the runtime loader (though I wonder if there was a reason why it had been omitted in the first place). VLC will possibly still crash, though, as the situation hints that the application shutdown isn't properly organized.

comment:5 Changed 8 years ago by bonefish

Blocking: 7368 added

(In #7368) Yep, looks like a dup of #6803.

comment:6 Changed 8 years ago by diver

FWIW, hrev39305 also has something to do with topological_sort.

comment:7 Changed 7 years ago by diver

Owner: changed from nobody to bonefish
Status: reopenedassigned running in R5 compatibility mode.
Last message repeated 1 time
runtime_loader: Cannot open file No such file or directory
Last message repeated 2 times.
vm_soft_fault: va 0x0 not covered by area in address space
vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x0, ip 0x104af7, write 0, user 1, thread 0x343
vm_page_fault: thread "VLC media player" (835) in team "VLC media player" (835) tried to read address 0x0, ip 0x104af7 ("runtime_loader_seg0ro" +0x4af7)
debug_server: Thread 835 entered the debugger: Segment violation
stack trace, current PC 0x104af7  topological_sort__FP7image_tUlPP7image_tUl + 0x4f:
  (0x7ffeeeec)  0x1058ac  get_sorted_image_list__FP7image_tPPP7image_tUl + 0xb4
  (0x7ffeef1c)  0x101a88  terminate_program + 0x28
  (0x7ffeef4c)  0xf6635c  exit + 0x38
  (0x7ffeef7c)  0x2633e2  _start + 0x6e (closest symbol)
  (0x7ffeefac)  0x10621e  runtime_loader + 0x126
debug_server: Killing team 835 (/data/vlc-0.8.6d/VLC media player)
debug_server: TeamDebugHandler::Init(): Failed to get info for team 835: Operation on invalid team
debug_server: KillTeam(): Error getting info for team 835: Operation on invalid team
debug_server: Killing team 835 ()

After installing this crash goes away.

comment:8 Changed 4 years ago by pulkomandy

I can't reproduce this with VLC 0.8.6i (BeOS version downloaded from Haikuware). Is it still a problem?

comment:9 Changed 4 years ago by diver

Still reproducible with vlc-0.8.6d at least in hrev48230.

comment:10 Changed 4 years ago by waddlesplash

Why do we care about 0.8.6d? d < i.

comment:11 in reply to:  10 Changed 4 years ago by anevilyak

Replying to waddlesplash:

Why do we care about 0.8.6d? d < i.

If you'd actually read the ticket, you'd notice it's triggering what's potentially a bug in the runtime loader.

comment:12 Changed 4 years ago by ttcoder

Summary: VLC crashes on exit (topological_sort)VLC crashes on exit (topological_sort) .. and other apps with add-ons?

Got word from dsuden, he just started seeing this on hrev48297, SP crashes every time it's shut-down (so not too annoying). See below.

Oddly he gets not just one but two segv's in two threads (the second crash does not seem related to topological_sort though).

Let's make the title a bit more general indeed, "vlc crashes.." is a bit misleading. Searching tickets for keyword "topological_sort" yields results for Deskbar (with add-ons), VLC (presumably with add-ons), and now our build of SP (which has a dozen add-ons loaded).

Debug information for team /boot/Masters/apps/TuneTracker System/SoundPlay/SoundPlay (562):
CPU(s): 2x AMD A-Series
Memory: 3.20 GiB total, 284.82 MiB used
Haiku revision: hrev48297 Nov 14 2014 04:09:02 (BePC)

Active Threads:
	thread 591: team 562 debug task 
	thread 562: SoundPlay (main)
		state: Exception (Segment violation)
		0x7245f3c8	0xad2c07	topological_sort(image_t*, uint32, image_t*, uint32) + 0x4f 
		0x7245f3f8	0xad39cf	get_sorted_image_list(image_t*, image_t*, uint32) + 0xaf 
		0x7245f428	0xacf0d7	terminate_program + 0x23 
		0x7245f458	0x72a35a	exit + 0x36 
		0x7245f498	0x1f1e2d3	_start + 0x5f 
		0x7245f4c8	0xad4ab0	runtime_loader + 0x130 
		00000000	0x61a6d250	commpage_thread_exit + 0 
			  eax:	0x00000000
	thread 571: _BMediaRoster_ 
		state: Exception (Segment violation)
		0x703b61b0	0xf12abd	BMessage::SendReply(BMessage*, BMessenger, int64) + 
		0x703b6240	0xf129bf	BMessage::SendReply(BMessage*, BHandler*, int64) + 0x47 
		0x703b6280	0xc111bb	BMediaRoster::MessageReceived(BMessage*) + 0x7b 
		0x703b62a8	0xf0e525	BLooper::DispatchMessage(BMessage*, BHandler*) + 0x59 
		0x703b62e8	0xf0fdcf	BLooper::task_looper() + 0x20f 
		0x703b6318	0xf0f9bd	BLooper::_task0_(void*) + 0x3d 
		0x703b6348	0x6c3ef9	thread_entry + 0x21 
		00000000	0x61a6d250	commpage_thread_exit + 0 

EDIT: dsuden realized he had another (unpackaged) version of SP lying around on that partition; when he trashed it, that fixed the main (packaged) SoundPlay: SP no longer crashes on exit now. Could be just an edge nudge rather than a proximate cause of the crash.. I wonder, though, how that could affect the runtime_loader even by a 'nudge'.. Multiple instances of an application is a matter that influences the registrar and its dependancies, not something as low-level as kernel images and add-ons loading? Or maybe it was trying to load the add-ons from the old SoundPlay, into the new version of SP ?

Last edited 4 years ago by ttcoder (previous) (diff)

comment:13 Changed 4 years ago by diver

Blocking: 12070 added

(In #12070) VLC version from HaikuPorts is broken atm. AFAIK, it needs some fixes to be able to use newer ffmpeg. You can use repackaged version of VLC from with ffmpeg lib compiled in.

The crash is a dupe of #6803.

comment:14 Changed 3 years ago by pulkomandy

Blocked By: 10968 added
Note: See TracTickets for help on using tickets.