Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#170570 - 14/07/2003 21:11 Failed to build dynamic database
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Well, I thought I was out of the woods with my problem, but it looks like I am not. Jemplode crashed while I was trying to sync, and now my player is hanging at the infamous Building music databases... step for a long period of time each boot. Here is what I tried to do to fix my problem:

* deleted /drive0/var/database, playlist and fids as per this FAQ entry
* deleted /drive1/var/database, playlist and fids on a hunch
* fscked my partitions again
* tried to sync with Emplode, but Emplode restarts the player, and does not wait indefinately for the player to re-start, resulting in an application crash (on Win2k)

The error messages I'm getting in my boot log look like this:
Prolux 4 empeg car - 2.1434 Mar 26 2003

Vcb: 0x4086d000
Adding Swap: 16028k swap-space (priority -2)
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
! playerdb.cpp : 182:Failed to build dynamic database (status=0xc004401a).
Restored terminal settings
Remounting first music partition read-only
Remounting second music partition read-only
Restart code received
Starting player
Hijack: intercepting config.ini

player.cpp : 385:empeg-car 2.00 2003/04/01.
! tags.cpp : 61:Failed to open tags (0xc0041002).

I see that error 0xc004401a means "Text file busy" (Player error) (from this page. So what does that mean? I hope I don't have to rebuild my drives.
_________________________
Mark Cushman

Top
#170571 - 14/07/2003 22:30 Re: Failed to build dynamic database [Re: cushman]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Ok, I have more information about this problem.

I can fix the problem temporarily by following Paul's instructions on running the player binary from the command prompt here. This will fix my player, but only until I modify the database.

Whenever I try to change the database, either with Jemplode or Emplode, the player will somehow lose the database, and display the messages I referenced above in the boot log:

! playerdb.cpp : 182:Failed to build dynamic database (status=0xc004401a).
_________________________
Mark Cushman

Top
#170572 - 14/07/2003 22:51 Re: Failed to build dynamic database [Re: cushman]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
It's not something silly like... a third party application like Emphatic or GPSapp is preventing the drive from being properly mounted and unmounted by the player during a synch?
_________________________
Tony Fabris

Top
#170573 - 15/07/2003 02:39 Re: Failed to build dynamic database [Re: cushman]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
I see that error 0xc004401a means "Text file busy" (Player error) (from this page).
The page is mistaken -- that list of error codes only applies to errors that start "0xC00410..". Error 0xC004401A just means "Error building dynamic database"; this could be caused by an out-of-memory error (if your database is particularly large or has unusually high FID numbers in, e.g. after using early versions of mp3tofid) or by a failure to open or read the dynamic data partition (e.g. as a symptom of underlying disk problems).

Peter

Top
#170574 - 15/07/2003 04:31 Re: Failed to build dynamic database [Re: peter]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

I am curious why the player software can build the databases under command line but not under emplode / jemplode. To me, this implies that the filesystems should be fine, but that there might be a memory issue involved. When the player is loaded (as during an emplode or jemplode), I would expect that there is less memory available for the database rebuild.

Question: I notice that you have a swapon in your boot log. Is that normal? I just do not remember seeing it myself.

You might want to try and throw a reservecache option in your config.ini. Try holding back some memory from the player application. Perhaps that will help, by making a little more available to the kernel.
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#170575 - 15/07/2003 04:57 Re: Failed to build dynamic database [Re: peter]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Ahh okay. Didn't know about that bit. I was wondering what all the other digits in between did

Top
#170576 - 15/07/2003 06:22 Re: Failed to build dynamic database [Re: tfabris]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
I don't think so Tony, I am running irattach, Empire and telnetd, but those are being run from /usr/local which I have mounted from /dev/hda2. I was under the assumption that this was a save place to run apps from, and that I would only run into problems if I was running an app from /drive0 or /drive1.
_________________________
Mark Cushman

Top
#170577 - 15/07/2003 06:46 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Thank you Peter! I thought at first it might be some crazy permissions problem or something, but now I see that isn't true. I do not have a particularly huge database (only 6000 songs). I disabled empire and telnetd, thinking that they could possibly be sucking memory, but that did not work either. I did have to run fsck, and it repaired some files. Do you think I have the beginnings of disk problems?
_________________________
Mark Cushman

Top
#170578 - 15/07/2003 06:53 Re: Failed to build dynamic database [Re: pgrzelak]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Hi Paul,

The swapon is called when I attempt to sync with Jemplode or Emplode. That log was taken after my player has booted, and during my attempt to sync. I do get the "cannot open tags" message when I boot, but I thought I'd display the more interesting messages when I attempt to sync.

I will try the reservecache option. Without ReserveCache, my memory looks like this:
empeg:/proc# cat meminfo

total: used: free: shared: buffers: cached:
Mem: 15294464 14979072 315392 761856 10690560 1654784
Swap: 0 0 0
MemTotal: 14936 kB
MemFree: 308 kB
MemShared: 744 kB
Buffers: 10440 kB
Cached: 1616 kB
SwapTotal: 0 kB
SwapFree: 0 kB

Does this look normal? This is without any 3rd party applications running, 2.00 final and hijack.
_________________________
Mark Cushman

Top
#170579 - 15/07/2003 09:12 Re: Failed to build dynamic database [Re: pgrzelak]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Thanks for the suggestion about ReserveCache Paul, but that did not help. I set ReserveCache to 48, and tried to sync, and I am still getting the "Failed to build dynamic database" error. Looks like I'm going to have to use the drive builder on my drives to get it all back to normal.
_________________________
Mark Cushman

Top
#170580 - 15/07/2003 09:30 Re: Failed to build dynamic database [Re: cushman]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
Looks like I'm going to have to use the drive builder on my drives to get it all back to normal.
Except for removing all third-party software, which is presumably not what you had in mind, the disk builder won't do anything to solve this problem.

You can test whether your disk is dying with

dd if=/dev/hda3 of=/dev/null bs=512

If it completes without error and says

33264+0 records in
33264+0 records out

then your disk is (at least for current purposes) fine.

Peter

Top
#170581 - 15/07/2003 09:30 Re: Failed to build dynamic database [Re: cushman]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Greetings!

Ugh. That is a drastic solution! Can you just rebuild that specific partition?
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#170582 - 15/07/2003 09:41 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
empeg:/empeg/bin# dd if=/dev/hda3 of=/dev/null bs=512
48194+0 records in
48194+0 records out

empeg:/empeg/bin# dd if=/dev/hdc3 of=/dev/null bs=512
33264+0 records in
33264+0 records out

That looks normal, right? I have a 10 gig and a 30 gig drive in the Empeg.

I guess I was under the assumption that if I were to use the disk builder, it would wipe my disks clean and I could then start from scratch. What would be the best way to "start over"? Re-install 2.0? I am willing to re-upload all my mp3's and 3rd party software, I just want to be able to sync successfully again.
_________________________
Mark Cushman

Top
#170583 - 15/07/2003 09:52 Re: Failed to build dynamic database [Re: cushman]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
empeg:/empeg/bin# dd if=/dev/hda3 of=/dev/null bs=512
48194+0 records in
48194+0 records out
Your dynamic partition is 24Mb instead of the normal 16Mb. How did that happen? Did you fdisk this disk yourself, instead of with a builder image? What does "fdisk -l /dev/hda" say?

Here's what it says on a standard disk:
empeg:/empeg/bin# fdisk -l /dev/hda


Disk /dev/hda: 16 heads, 63 sectors, 38760 cylinders
Units = cylinders of 1008 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 66 33232+ 5 Extended
/dev/hda2 67 132 33264 83 Linux
/dev/hda3 133 165 16632 10 OPUS
/dev/hda4 166 38760 19451880 83 Linux
/dev/hda5 1 33 16569 83 Linux
/dev/hda6 34 66 16600+ 82 Linux swap
Clearly the number in bold is going to be different on different-sized disks, but the rest of the block sizes should be just about the same (and, if your cylinders are the same size as mine, exactly the same).

Peter

Top
#170584 - 15/07/2003 10:08 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Your dynamic partition is 24Mb instead of the normal 16Mb. How did that happen?

Beats me! I did not fdisk the drive myself (that I can recall, and I probably would recall if I did), I followed the drive upgrade instructions, and used the disk builder .upgrade during the upgrade. hda is my 30g drive, which is the new one I installed. Here is the fdisk output:
empeg:/empeg/bin# fdisk -l /dev/hda


Disk /dev/hda: 255 heads, 63 sectors, 4864 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 5 40131 5 Extended
/dev/hda2 6 10 40162+ 83 Linux
/dev/hda3 11 13 24097+ 10 OPUS
/dev/hda4 14 4864 38965657+ 83 Linux
/dev/hda5 1 3 24034+ 83 Linux
/dev/hda6 4 5 16033+ 82 Linux swap
It doesn't look like your output at all :|
_________________________
Mark Cushman

Top
#170585 - 15/07/2003 10:15 Re: Failed to build dynamic database [Re: cushman]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Different drive geometries. The number is in cylinders. To get the usable space, you need to multiply the number of cylinders for each partition by the number of blocks per cylinder (16065 in your case, 1008 in Peter's case). This will give you the number of blocks (1/2k) per partition.

Edit: Or just look under the block count... I am not doing well with this today...


Edited by pgrzelak (15/07/2003 10:17)
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#170586 - 15/07/2003 10:17 Re: Failed to build dynamic database [Re: cushman]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Now that I look at it:

Units = cylinders of 16065 * 512 bytes

so 1 unit = 8225280 bytes

/dev/hda3 11 13 24097+ 10 OPUS

/dev/hda3 is 2 units long, so (8225280*2) / 1024 = 16,128k

Does it have to be exactly the same size as yours, Peter?
_________________________
Mark Cushman

Top
#170587 - 15/07/2003 10:18 Re: Failed to build dynamic database [Re: pgrzelak]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Yup, you're right! I was banging away on 'calc' when you posted this!
_________________________
Mark Cushman

Top
#170588 - 15/07/2003 10:18 Re: Failed to build dynamic database [Re: cushman]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
Disk /dev/hda: 255 heads, 63 sectors, 4864 cylinders
Units = cylinders of 16065 * 512 bytes
Oh, OK, panic over.

Your disk is configured as a small number of huge cylinders, not (as both mine are) a large number of small cylinders. In fact, your cylinder size is nearly 8Mb, so that's the granularity of your partition sizes. When the builder tries to make a 16Mb partition, it of course has to round up to the nearest cylinder -- two cylinders don't quite make 16Mb, so it uses three cylinders, or nearly 24Mb. (Likewise your "32Mb" partitions are nearly 40Mb.)

So whatever your problem is, it isn't this The response you got from the "dd" command indicates your disk is working fine. So if a clean install of 2.0final (with no third-party software, even Hijack) still does this, then I guess I'll have to find some time to bung you a copy with some more debugging enabled, and if there's a genuine problem we're looking at a 2.01 release...

Peter

Top
#170589 - 15/07/2003 10:23 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Thanks, Peter. I guess my math was off in my post above, I need to learn to subtract better.

I will re-install 2.0final and see if that works. Thanks again for your time spent reading my posts!
_________________________
Mark Cushman

Top
#170590 - 15/07/2003 10:32 Re: Failed to build dynamic database [Re: cushman]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
hda is my 30g drive
40G drive, right? 4864*16065*512 is about a gnat's crotchet more than forty billion bytes, which is about 37 and a quarter Gb -- about what manufacturers sell as 40Gb.

Peter

Top
#170591 - 15/07/2003 10:39 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Yes, you are right, it is a 40 gig!

<Bubs>I'm such a dummy!</Bubs>
_________________________
Mark Cushman

Top
#170592 - 15/07/2003 11:11 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Peter, I re-applied 2.0final by double clicking on the .upgrade file and following the wizard through until completion, and I am still having the problem. This is my boot log:
empeg-car bootstrap v1.02 20001106 ([email protected])

If there is anyone present who wants to upgrade the flash, let them speak now,
or forever hold their peace...it seems not. Let fly the Penguins of Linux!

e000 v1.04
Copying kernel...
Calling linux kernel...
Uncompressing Linux..................................... done, booting the kerne
l.
Linux version 2.2.14-rmk5-np17-empeg52 (rob@aphex) (gcc version 2.95.3 20010315
(release)) #11 Tue Apr 1 18:49:59 BST 2003
Processor: Intel StrongARM-1100 revision 11
NetWinder Floating Point Emulator V0.94.1 (c) 1998 Corel Computer Corp.
empeg-car player (hardware revision 9, serial number 30102782)
Command line: mem=16m
Calibrating delay loop... 207.67 BogoMIPS
Memory: 15024k/16M available (964k code, 20k reserved, 372k data, 4k init)
Dentry hash table entries: 2048 (order 2, 16k)
Buffer cache hash table entries: 16384 (order 4, 64k)
Page cache hash table entries: 4096 (order 2, 16k)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
TCP: Hash tables configured (ehash 16384 bhash 16384)
IrDA (tm) Protocols for Linux-2.2 (Dag Brattli)
Linux-IrDA: IrCOMM protocol ( revision:Tue May 18 03:11:39 1999 )
ircomm_tty: virtual tty driver for IrCOMM ( revision:Wed May 26 00:49:11 1999 )
Starting kswapd v 1.5
SA1100 serial driver version 4.27 with no serial options enabled
ttyS00 at 0xf8010000 (irq = 15) is a SA1100 UART
ttyS01 at 0xf8050000 (irq = 17) is a SA1100 UART
ttyS02 at 0xf8030000 (irq = 16) is a SA1100 UART
Signature is 67706d65 'empg'
Scheduling custom logo.
empeg display initialised.
empeg dsp audio initialised
empeg dsp mixer initialised
empeg dsp initialised
empeg audio-in initialised, CS4231A revision a0
empeg remote control/panel button initialised.
empeg usb initialised, PDIUSBD12 id 1012
empeg state support initialised 0089/88c1 (save to d0004c00).
empeg RDS driver initialised
empeg power-pic driver initialised (first boot)
RAM disk driver initialized: 16 RAM disks of 4096K size
empeg single channel IDE
Probing primary interface...
hdb: IBM-DJSA-210, ATA DISK drive
hda: IC25N040ATCS04-0, ATA DISK drive
hdb: IBM-DJSA-210, ATA DISK drive
ide0 at 0x000-0x007,0x038 on irq 6
hda: IC25N040ATCS04-0, 38154MB w/1768kB Cache, CHS=4864/255/63
hdb: IBM-DJSA-210, 9590MB w/384kB Cache, CHS=19485/16/63
empeg-flash driver initialized
smc chip id/revision 0x3349
smc9194.c:v0.12 03/06/96 by Erik Stahlman ([email protected])

SMC9194: SMC91C94(r:9) at 0x4008000 IRQ:7 INTF:TP MEM:6144b MAC 00:02:d7:26:0a:d
e
Partition check:
hda: hda1 < hda5 hda6 > hda2 hda3 hda4
hdb: hdb1 < hdb5 hdb6 > hdb2 hdb3 hdb4
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 320 blocks [1 disk] into ram disk... done.
VFS: Mounted root (ext2 filesystem).
empeg-pump v0.03 (19980601)
Press Ctrl-A to enter pump...VFS: Mounted root (ext2 filesystem) readonly.
change_root: old root has d_count=1
Trying to unmount old root ... okay
Freeing unused kernel memory: 4k initempeg init 0.8
I see this is a developer image!
Mounting proc
Mounting first music partition
Tried to mount /dev/hda4 as reiserfs but got error 19
Mounting second music partition
Remounting first music partition read-only
Remounting second music partition read-only
Press 'q' now to go into development mode. You Have Zero Seconds To Comply...
Starting player
player.cpp : 385:empeg-car 2.00 2003/04/01.
Prolux 4 empeg car - 2.1434 Mar 26 2003
Vcb: 0x4086d000
serial_notify_thread.cpp: 180:@@ #0 0:00:00
serial_notify_thread.cpp: 170:@@ S0

After the player boots successfully, I then go into Emplode 2.0, I modify a single track to change the database (this time I deleted a duplicate track I had marked), and then press the Sync button. The serial log shows:

serial_notify_thread.cpp: 170:@@ S0

Adding Swap: 16028k swap-space (priority -1)
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hda4 is mounted.
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
ext2fs_check_if_mount: No such file or directory while determining whether /dev/
hdc4 is mounted.
serial_notify_thread.cpp: 170:@@ S0
serial_notify_thread.cpp: 180:@@ #0 0:00:00
! playerdb.cpp : 182:Failed to build dynamic database (status=0xc004401a).
Restored terminal settings
Remounting first music partition read-only
Remounting second music partition read-only
Restart code received
Starting player
player.cpp : 385:empeg-car 2.00 2003/04/01.
! tags.cpp : 61:Failed to open tags (0xc0041002).

Is there anything else you need to see to debug this problem?
_________________________
Mark Cushman

Top
#170593 - 15/07/2003 11:25 Re: Failed to build dynamic database [Re: cushman]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Have you turned on the sync log feature of emplode? Big and ugly, but it might help show something else in the background.
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#170594 - 15/07/2003 11:47 Re: Failed to build dynamic database [Re: pgrzelak]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
I'll do that. Right now I'm rebuilding the database manually (for the umteenth time) but do you think anything interesting will pop up? I'm still puzzled as to why the player will not rebuild the database when it is started normally (like on a reboot) but it will rebuild successfully when I run it manually from a shell.

I'm so tempted to just whack it with the drive builder, but if it's a bug, I'd like to help debug it. Wouldn't the drive builder re-fdisk the drives and rebuild all the partitions and basically let me start from scratch again?

My cat is even getting tired of playing with the laser pointer. I've been teasing him with it all morning while I wait for my database to be rebuilt.


Attachments
169113-cat_and_laser.jpg (80 downloads)

_________________________
Mark Cushman

Top
#170595 - 15/07/2003 11:49 Re: Failed to build dynamic database [Re: cushman]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Whoops, saved as a .gif instead of a .jpg.

I'm, I'm a dick, I'm addicted to you.


Attachments
169114-cat_and_laser.jpg (102 downloads)

_________________________
Mark Cushman

Top
#170596 - 15/07/2003 13:25 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Peter, I turned on my log in Emplode, and I've attached it to this post. I couldn't see anything terribly obvious in there, except for the errors that I am getting via Hyperterminal too. I turned on the log directly before doing a Sync, and let it go until Emplode crashed.


Attachments
169134-emplode.log (79 downloads)

_________________________
Mark Cushman

Top
#170597 - 17/07/2003 11:09 Re: Failed to build dynamic database [Re: peter]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
I used the disk builder from the empeg.com website, and afterwards re-applied 2.0final. It seems to have worked, I've synced a few songs with Emplode successfully with no errors. I'm going to load all my music back, then re-install what sofware I had on before and see if it is still working.
_________________________
Mark Cushman

Top