audiooss?

Ziying Sherwin sherwin at nlm.nih.gov
Fri Jan 18 08:33:12 MST 2002


    [ The following text is in the "X-UNKNOWN" character set. ]
    [ Your display is set for the "ISO-8859-1" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Erik,

Congratulation for finding the problem. I actually had several questions sent
to Jon about the new release of nas (version 1.5). Hopefully, we can get
libaudiooss working on next nas release.

Here attaches the output you want and I just restarted the nasd server on
port 8041.

Good luck,
Ziying


mer[root]csh:52>gdb nasd
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-sun-solaris2.6),
Copyright 1996 Free Software Foundation, Inc...
(gdb) attach 28597
Attaching to program `/depot/bin/nasd', process 28597
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libpthread.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1...done.
Reading symbols from /usr/lib/libthread.so.1...done.
0xff219468 in __open ()
(gdb) where
#0  0xff219468 in __open ()
#1  0xff21273c in _libc_open ()
#2  0xff15a9ec in _ti_open ()
#3  0x1b97c in AuInitDevice (auSetup=0x3f370, len=0xffbefa3c) at auconfig.c:118
#4  0x17edc in AuInitSetupReply () at audispatch.c:1611
#5  0x14a4c in main (argc=247808, argv=0x3c800) at main.c:180

And here is the lines in auconfig.c

   115      for (i = 0; i < AuMaxCB; i++)
   116          AuCallbacks[i] = 0;
   117
   118      if (!AuInitPhysicalDevices())
   119          return AuFalse;
   120
   121      AuCreateResourceTypes();
   122      AuCallback(AuCreateServerComponentsCB,
   123                 (&auServerDeviceListSize, &auServerBucketListSize,
   124                  &auServerRadioListSize, &auServerMinRate, &auServerMaxRate));

Lines from audispatch.c:

  1604  int
  1605  AuInitSetupReply()
  1606  {
  1607      int             len;
  1608      char           *rel = release + 4;
  1609      static char    *string;
  1610
  1611      if (!AuInitDevice(&auSetup, &len))
  1612          return 0;
  1613
  1614      if (string)
  1615      {
  1616          aufree(string);
  1617          string = (char *) 0;
  1618      }

Lines from main.c:

   177          if (!InitClientResources(serverClient))      /* for root resources */
   178              FatalError("couldn't init server resources");
   179
   180          if (!AuInitSetupReply())
   181              FatalError("could not create audio connection block info");
   182
   183          Dispatch();
   184
   185          FreeAllResources();
   186
   187          if (dispatchException & DE_TERMINATE)
   188          {
   189              break;
   190          }
   191      }
   192      exit(0);
   193  }


On Thu, 17 Jan 2002, [ISO-8859-1] Erik Inge Bolsø wrote:

> On Thu, 17 Jan 2002, Ziying Sherwin wrote:
> >How about trying:
> >
> >setenv AUDIOSERVER merrill:41
> >
> >That worked for me a moment ago.
>
> Thanks.
>
> I'm becoming more and more convinced we're hitting a bug in the solaris
> NAS server somewhere. I've been able to reproduce here now.
>
> Does it hang in the same place every time, with mpg123?
>
> In my case, this was the last few lines of libaudiooss...
>
> DSP: set stereo (arg = 0)
> inside rebuildElements()
> hijacking /dev/dsp ioctl (501 : c0045002 - 0xbffff650)
> DSP: read rate or set rate to 22050
> inside rebuildElements()
> hijacking /dev/dsp ioctl (501 : c0045005 - 0xbffff658)
> DSP: set format to: ALAW
> inside rebuildElements()
> hijacking /dev/dsp ioctl (501 : c0045003 - 0xbffff654)
> DSP: set stereo (arg = 0)
> inside rebuildElements()
>
> It is an AuOpenServer command that hangs...
>
> #0  0x400e77fe in select () from /lib/libc.so.6
> #1  0x4001961c in __DTOR_END__ () from /usr/X11R6/lib/libaudiooss.so.1.0
> #2  0x4012f5cf in _AuWaitForReadable () from /usr/X11R6/lib/libaudio.so.2
> #3  0x4012fab3 in _AuRead () from /usr/X11R6/lib/libaudio.so.2
> #4  0x4013295a in AuOpenServer () from /usr/X11R6/lib/libaudio.so.2
> #5  0x40017694 in nas_open () from /usr/X11R6/lib/libaudiooss.so.1.0
> #6  0x40015233 in rebuildElements () from
> /usr/X11R6/lib/libaudiooss.so.1.0
> #7  0x40016a43 in dspctl () from /usr/X11R6/lib/libaudiooss.so.1.0
> #8  0x40016aa8 in ioctl () from /usr/X11R6/lib/libaudiooss.so.1.0
> #9  0x8062544 in strcpy ()
>
> Could you do a gdb attach and backtrace on the nasd process, to see what
> it is doing when audiooss/mpg123 is hung?
>
> In fact, it seems we hit a deadlock in the nasd server, or makes it
> malfunction somehow, because auinfo no longer works now, after a
> hang-and-kill. It also hangs.
>
> Get a backtrace of the nasd process, then we'll take it to the NAS list, I
> think. Definitely a server-side issue.
>
> Oh, and please restart a nasd server, so I can test whether other programs
> than mpg123 do the same to the poor thing :)
>
> >On Thu, 17 Jan 2002, [ISO-8859-1] Erik Inge Bolsø wrote:
> >> On Wed, 16 Jan 2002, Ziying Sherwin wrote:
> >> >Erik,
> >> >
> >> >Sorry for taking that long to reply to you. The version of nas we tested
> >> >before is 1.4.2d. I just had time to install the newest release version
> >> >1.5 and started to use that.
> >> >
> >> >After step 5, everything looks fine. We can test nas using auinfo or
> >> >autool without any problems.
> >> >
> >> >I tried to run gdb and attach the hanging process to gdb, here is the output:
> >> >
> >> >mer[zs]ksh:1048>gdb mpg123
> >> >GDB is free software and you are welcome to distribute copies of it
> >> > under certain conditions; type "show copying" to see the conditions.
> >> >There is absolutely no warranty for GDB; type "show warranty" for details.
> >> >GDB 4.16 (sparc-sun-solaris2.6),
> >> >Copyright 1996 Free Software Foundation, Inc...(no debugging symbols found)...
> >> >(gdb) attach 26975
> >> >Attaching to program `/export/home/guest/mpg123-0.59r/mpg123', process 26975
> >> >Reading symbols from /depot/lib/libaudiooss.so.1.0...
> >> >(no debugging symbols found)...done.
> >> >Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols found)...
> >> >done.
> >> >Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols found)...
> >> >done.
> >> >Reading symbols from /usr/lib/libm.so.1...(no debugging symbols found)...done.
> >> >Reading symbols from /usr/lib/libc.so.1...(no debugging symbols found)...done.
> >> >Reading symbols from /usr/openwin/lib/libX11.so.4...
> >> >(no debugging symbols found)...done.
> >> >Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols found)...done.
> >> >Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols found)...done.
> >> >Reading symbols from /usr/openwin/lib/libXext.so.0...
> >> >(no debugging symbols found)...done.
> >> >Reading symbols from /usr/openwin/lib/libdga.so.1...
> >> >(no debugging symbols found)...done.
> >> >Reading symbols from /usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1...
> >> >(no debugging symbols found)...done.
> >> >0xff21958c in _libc_poll ()
> >> >(gdb) where
> >> >#0  0xff21958c in _libc_poll ()
> >> >#1  0xff1cc7c0 in _libc_select ()
> >> >#2  0xff364880 in __select ()
> >> >#3  0xff36964c in AuSetIOErrorHandler ()
> >> >#4  0xff369bd0 in _AuRead ()
> >> >#5  0xff366fe4 in AuOpenServer ()
> >> >#6  0xff365434 in nas_open ()
> >> >#7  0xff363368 in open ()
> >> >#8  0xff3645bc in __ioctl ()
> >> >#9  0x2bc70 in audio_get_formats ()
> >> >#10 0x215b0 in audio_capabilities ()
> >> >#11 0x141f4 in main ()
> >> >(gdb)
> >> >
> >> >
> >> >The only thing I can think if that you test the libaudiooss between a Solaris
> >> >machine and a PC. How about test it between two PCs? You can set the AUDIOSERVER
> >> >to merrill:10. You might not be able to hear the music if it works but at
> >> >least you can see the output if it hangs.
> >>
> >> Well, I'm unable to even use auinfo or auplay on merrill:10, both locally
> >> on merrill and remotely from here... hangs forever, or times out with
> >> "Can't connect" - you sure nothing is amiss there? Would you please check
> >> up on that?
> >>
> >> nasd is running, sure... but nasd doesn't seem to be actually working
> >> there... (perhaps it is stuck trying to grab the sound device?)
> >>
> >> Any other nasd's running anywhere near?
> >>
> >> Hmm.
> >>
> >> NAS 1.4, libaudiooss 0.9.16, linux client (university server)
> >> NAS 1.4.2d linux server                   (my own pc)
> >> -- works fine
> >>
> >> NAS 1.4.2d, libaudiooss 0.9.15, solaris client (merrill)
> >> NAS 1.4.2d linux server                        (my own pc)
> >> -- works fine

--
Erik I. Bolsø | email: <knan at mo.himolde.no>
The UNIX philosophy basically involves giving you enough rope to
hang yourself.  And then a couple of feet more, just to be sure.







More information about the Nas mailing list