Bug#290733: torsmo bug

2005-03-02 Thread Pierre Habouzit
On Mon, Jan 24, 2005 at 07:50:23AM -0500, Justin Pryzby wrote:
 On Mon, Jan 24, 2005 at 10:14:39AM +0100, Goswin von Brederlow wrote:
  Hi,
  
  I wanted to track this bug but can't reproduce it on amd64:
 Right.  I've been working with the submitter without much success.  I
 asked for a shell account but that wasn't a possibility.  Coredumps
 all indicate a stack smash.  And the strace indicates some problem
 during initialization, before the call to init_X11.
 
 I've given the submitter debugging instructions, involving a gdb trap
 on SIGFPE (though it will probably just show stack damage), and also
 the old stick-a-printf-after-reading-everything-in.  Maybe there are
 uninitialized variables, or something..  I was looking for 2.4isms
 (like /proc/meminfo), but there appear to be 2.6isms instead..

  well, I can reproduce it in fact.  trace attached :

[madcoder hades] sudo swapon /dev/hda3
[madcoder hades] torsmo
torsmo: drawing to subwindow of root window (18d)
torsmo: drawing to single buffer
[...]
  
[madcoder hades] sudo swapoff -a
[madcoder hades] torsmo
zsh: 19945 floating point exception  torsmo

[madcoder hades] uname -a
Linux hades 2.6.10-ck1 #1 Sun Dec 26 23:39:17 CET 2004 i686 GNU/Linux



  I've looked into the sources, the patch is trivial, and is attached.

-- 
·O·  Pierre Habouzit
··O
OOOhttp://www.madism.org
--- torsmo.old.c2005-03-02 12:16:00.398012799 +0100
+++ torsmo.c2005-03-02 12:16:22.343340163 +0100
@@ -1126,7 +1126,8 @@
   human_readable(cur-swapmax*1024, p);
 }
 OBJ(swapperc) {
-  snprintf(p, 255, %*u, pad_percents, (cur-swap*100) / cur-swapmax);
+  snprintf(p, 255, %*u, pad_percents,
+  cur-swapmax ? (cur-swap*100) / (cur-swapmax) : 0);
 }
 OBJ(swapbar) {
   new_bar(p, obj-data.pair.a, obj-data.pair.b,


Bug#290733: torsmo bug #290733

2005-01-27 Thread Justin Pryzby
On Thu, Jan 27, 2005 at 09:48:43AM -0500, pryzbyj wrote:
 On Thu, Jan 27, 2005 at 01:28:55PM +0100, [EMAIL PROTECTED] wrote:
  hi
  
  i'm not familiar with the bug system, so i'm emailing you... sorry
  if i was doing wrong...
 Nope, this is good.
 
  it's about the torsmo bug 290733:
  
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=290733
 
  and you were writing that it is a sid only bug. i'm using sarge and
  the version 0.18-1 is now also in the testing...
 Okay, I think you're right, so I've untagged it 'sid'.
FWIW this *used* to be a sid-only bug, but the severity was lowered,
thusly allowing it to enter testing.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#290733: torsmo bug

2005-01-27 Thread Justin Pryzby
Excellent news, I am copying upstream with your findings.  And I
appologies for reporting that there was a new upstream release; I read
the numbers wrong, of course (the maintainer lowered the severity of
the bug, which allowed to to enter testing, thusly confusing me). 

Thanks,
Justin

On Thu, Jan 27, 2005 at 07:23:54PM +0100, fellow wrote:
  You might also try running it under valgrind (valgrind torsmo) and
  see if it will spot any invalid memory references.  (valgrind is for
  x86 only, but that's okay:)
  
  Justin
 
 Hi!
 First of all: sorry, but I have some exams and other activities in the
 past days, but now I'm ready for bug-hunting ;-)
 
 (...)
 
 And after some hours, I found out what the problem is (original log
 is mia, but I can reproduce it, when it's necessary):
 
 ==5830== Process terminating with default action of signal 8 (SIGFPE)
 ==5830==  Integer divide by zero at address 0xB0025206
 ==5830==at 0x804E802: generate_text (torsmo.c:1129)
 ==5830==by 0x8050A01: main (torsmo.c:2289)
 
 The 1129th line: 
 snprintf(p, 255, %*u, pad_percents, (cur-swap*100) / cur-swapmax);
 
 I use a custom kernel (http://fellow.linuxforum.hu/patch/pear.html)
 without kernel module and swap support (because I don't need them).
 Now I turned on swap, make a swapfile, reboot... and torsmo-0.18 works
 great!
 
 Please send a (better) bugreport to the author about this bug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#290733: torsmo bug

2005-01-24 Thread Goswin von Brederlow
Hi,

I wanted to track this bug but can't reproduce it on amd64:

Linux frosties 2.6.8-frosties-1 #2 Sun Oct 3 22:06:03 CEST 2004 x86_64 GNU/Linux

Get:1 http://debian-amd64.alioth.debian.org testing/main torsmo 0.18-1 [37.7kB]

MfG
Goswin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#290733: torsmo bug

2005-01-24 Thread Justin Pryzby
On Mon, Jan 24, 2005 at 10:14:39AM +0100, Goswin von Brederlow wrote:
 Hi,
 
 I wanted to track this bug but can't reproduce it on amd64:
Right.  I've been working with the submitter without much success.  I
asked for a shell account but that wasn't a possibility.  Coredumps
all indicate a stack smash.  And the strace indicates some problem
during initialization, before the call to init_X11.

I've given the submitter debugging instructions, involving a gdb trap
on SIGFPE (though it will probably just show stack damage), and also
the old stick-a-printf-after-reading-everything-in.  Maybe there are
uninitialized variables, or something..  I was looking for 2.4isms
(like /proc/meminfo), but there appear to be 2.6isms instead..

Note that this is a sid-only bug.

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]