* Falk Hueffner <[EMAIL PROTECTED]> [2005-08-20 03:13]:
> (o) SPACE:18301984TB waiting_WAVs:00 DAE:0+1 ENC:1+0 errors: 952 :-[
> Unfortunately, I don't have 18301984 TB of disk space. It's probably
> a 64 bit problem.

jack_functions.df() tries to use os.statvfs() and falls back to
calling df directly.  Maybe there's a problem here.  Alternatively,
there could be a problem later on.

Can you please try 3 things:

1. does the following work okay?

8425:[EMAIL PROTECTED]: ~] python
>>> from os import statvfs
>>> statvfs(".")
(4096, 4096, 4643036L, 1401905L, 1401905L, 2359296L, 2269308L, 2269308L, 0, 255)
>>> (f_bsize, f_frsize, f_blocks, f_bfree, f_bavail, f_files, f_ffree, 
>>> f_favail, f_flag, f_namemax) = statvfs(".")
>>> long(f_bavail) * long(f_bsize)
5740130304L
>>>

2. If not, can you take a look at line 51+ of 
/usr/lib/python2.3/site-packages/jack_functions.py
I guess that "df ." returns the right thing.  Is the blocksize 1024 on Alpha?

3. If all of this is correct, please attach the patch below (in
/usr/lib/python2.3/site-packages/) and send me the jack.debug file.

-- 
Martin Michlmayr
http://www.cyrius.com/
--- jack_main_loop.py~  2005-08-24 12:05:07.000000000 +0100
+++ jack_main_loop.py   2005-08-24 12:19:48.000000000 +0100
@@ -69,14 +69,25 @@
                              ### MAIN LOOP ###
                            #####################
 
+    tbm = open("jack.debug", "a")
+    tbm.write("-"*76 + "\n")
     global_start = time.time()
     while mp3s_todo or enc_queue or dae_queue or enc_running or dae_running:
         orig_space = space
+        tbm.write("orig space: %d\n" % orig_space)
                             # feed in the WAVs which have been there from the 
start
+        if mp3s_todo:
+            tbm.write("mp3s_todo[0]: %s\n" % mp3s_todo[0])
+            tbm.write("tracksize: %d\n" % 
jack_functions.tracksize(mp3s_todo[0])[ENC])
+        else:
+            tbm.write("mp3s_todo is emtpy\n")
         if mp3s_todo and jack_functions.tracksize(mp3s_todo[0])[ENC] < space:
+            tbm.write("tracksize < space\n")
             waiting_space = 0
+            tbm.write("waiting space (a) = 0\n")
             enc_queue.append(mp3s_todo[0])
             space = space - jack_functions.tracksize(mp3s_todo[0])[ENC]
+            tbm.write("space (-= tracksize): %d\n" % space)
             jack_status.enc_stat_upd(mp3s_todo[0][NUM], "waiting for encoder.")
             mp3s_todo = mp3s_todo[1:]
 
@@ -84,6 +95,7 @@
 
         elif (len(enc_queue) + enc_running) < (cf['_read_ahead'] + 
cf['_encoders']) and dae_queue and dae_running < cf['_rippers'] and 
((jack_functions.tracksize(dae_queue[0])[BOTH] < space) or (cf['_only_dae'] and 
jack_functions.tracksize(dae_queue[0])[WAV] < space) or (cf['_otf'] and 
jack_functions.tracksize(dae_queue[0])[ENC] < space)):
             waiting_space = 0
+            tbm.write("waiting space (b) = 0\n")
             this_is_ok = 1
             if pause:
                 this_is_ok = 0
@@ -99,14 +111,23 @@
                     this_is_ok = 0
             if this_is_ok:
                 if cf['_only_dae']:
+                    tbm.write("only_dae\n")
                     space_waiting = space_waiting + 
jack_functions.tracksize(dae_queue[0])[WAV]
                     space = space - jack_functions.tracksize(dae_queue[0])[WAV]
+                    tbm.write("space waiting: %d\n" % space_waiting)
+                    tbm.write("space: %d\n" % space)
                 elif cf['_otf']:
+                    tbm.write("otf\n")
                     space_waiting = space_waiting + 
jack_functions.tracksize(dae_queue[0])[ENC]
                     space = space - jack_functions.tracksize(dae_queue[0])[ENC]
+                    tbm.write("space waiting: %d\n" % space_waiting)
+                    tbm.write("space: %d\n" % space)
                 else:
+                    tbm.write("else\n")
                     space_waiting = space_waiting + 
jack_functions.tracksize(dae_queue[0])[BOTH]
                     space = space - 
jack_functions.tracksize(dae_queue[0])[BOTH]
+                    tbm.write("space waiting: %d\n" % space_waiting)
+                    tbm.write("space: %d\n" % space)
                 dae_running = dae_running + 1
                 track = dae_queue[0]
                 dae_queue = dae_queue[1:]
@@ -402,10 +423,14 @@
 
             cycles = cycles + 1
             if cycles % 30 == 0:
+                tbm.write("cycles mod 30 == 0 (%d)\n" % cycles)
                 if cf['_recheck_space'] and not 
cf['space_from_argv']['history'][-1][0] == "argv":
                     actual_space = jack_functions.df()
+                    tbm.write("actual space: %d\n" % actual_space)
+                    tbm.write("space_adjust: %d\n" % space_adjust)
                     if space_adjust:
                         diff = actual_space - space
+                        tbm.write("diff: %d\n" % diff)
                         if diff > space_adjust:
                             space = space + space_adjust
                             space_adjust = 0
@@ -417,6 +442,8 @@
                         if actual_space < space:
                             space_adjust = space - actual_space
                             space = actual_space
+                    tbm.write("space: %d\n" % space)
+                    tbm.write("space_adjust: %d\n" % space_adjust)
 
             if space_adjust and enc_running == 0 and dae_running == 0:
                 waiting_space = waiting_space + 1
@@ -477,6 +504,7 @@
             
             jack_term.tmod.update(jack_display.special_line, 
jack_display.bottom_line)
 
+    tbm.close()
     return global_error
 
 # end of main loop #########################################################

Reply via email to