NetBSD Problem Report #28924

From njoly@pasteur.fr  Sun Jan  9 21:49:00 2005
Return-Path: <njoly@pasteur.fr>
Received: from electre.pasteur.fr (electre.pasteur.fr [157.99.64.120])
	by narn.netbsd.org (Postfix) with ESMTP id 0440B63B400
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  9 Jan 2005 21:49:00 +0000 (UTC)
Message-Id: <20050109214919.86DC142033@cixy.dial.pasteur.fr>
Date: Sun,  9 Jan 2005 22:49:19 +0100 (CET)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@netbsd.org
Subject: game/exult pthread assertion failure on NetBSD -current
X-Send-Pr-Version: 3.95

>Number:         28924
>Category:       pkg
>Synopsis:       game/exult pthread assertion failure on NetBSD -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 09 21:51:00 +0000 2005
>Originator:     Nicolas Joly
>Release:        NetBSD 2.99.12
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD cixy.dial.pasteur.fr 2.99.12 NetBSD 2.99.12 (CIXY) #6: Thu Jan 6 22:19:55 CET 2005 njoly@cixy.dial.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/CIXY i386
Architecture: i386
Machine: i386
>Description:
While running exult on -current NetBSD/i386 (or NetBSD/amd64), i'm seeing many
pthread assertions failures :

njoly@cixy [~/Ultima7Vf]> exult 
Exult version 1.2
Built at: Jan  9 2005 15:21:09
Compile-time options: USE_EXULTSTUDIO, HAVE_ZIP_SUPPORT
Compiler: gcc, version: 3.3.3 (NetBSD nb3 20040520)

Platform: Unknown
Exult path settings:
Data          : /usr/pkg/share/exult
Digital music : /usr/pkg/share/exult/music

Music player: Internal cheapass forked midi player
Black Gate   : found
exult_bg.flx : found
Serpent Isle : not found (static/sispeech.spc)
exult_si.flx : found
Starting forked player failed
assertion "unreachable" failed: file "/local/src/NetBSD/src/lib/libpthread/pthread.c", line 523, function "pthread__idle"
[...]

Then, the system becomes unresponsive until the `exult.core' file is
generated (about 770MB).

I tracked down this problem, and noticed that exult program depend on a
missing `playmidi' command to play MIDI files :
http://sourceforge.net/projects/playmidi/
But i failed to make it work on NetBSD.

As a workaround for NetBSD, i patched `audio/midi_drivers/forked_player.cc'
to use native command `midiplay' instead.

For the pthread assertion failure, i can't figure if the problem comes from
exult code, or if our pthread library is faulty ... I'm not familiar enough
with pthreads.

>How-To-Repeat:
>Fix:
--- audio/midi_drivers/forked_player.cc.ori	2005-01-09 22:08:41.000000000 +0100
+++ audio/midi_drivers/forked_player.cc	2005-01-09 22:09:26.000000000 +0100
@@ -41,7 +41,11 @@
 // NB: This function doesn't return unless execlp fails!
 static  void    playFJmidifile(const char *name)
 {
+#ifdef __NetBSD__
+	execlp("midiplay","-v","-v",name,0);
+#else
 	execlp("playmidi","-v","-v","-e",name,0);
+#endif
 }

 forked_player::forked_player() : forked_job(-1)

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.