Bug 3675

Summary: cputime patches cause Konqueror to crash when it tries to execute JavaScript
Product: Alternate Trees Reporter: Rafael J. Wysocki (rjwysocki)
Component: mmAssignee: Martin Schwidefsky (schwidefsky)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.10-rc1-mm2 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Fix do_setitimer

Description Rafael J. Wysocki 2004-10-31 07:37:28 UTC
Distribution: SuSE 9.1/x86-64 
Hardware Environment: (1) 2 x Opteron 240 w/ NUMA, 1 GB RAM, workstation; (2) 
Athlon 64 3000+, 512 MB RAM, laptop 
Software Environment: (1) linux-2.6.10-rc1-mm2 + SuSE 9.1/x86-64 + KDE 3.3.1 
(from SuSE RPMs) + gcc 3.4; (2) linux-2.6.10-rc1-mm2 + SuSE 9.1/x86-64 + KDE 
3.2.3 (from SuSE RPMs) 
Problem Description: Konqueror (3.2.3, 3.3.1) crashes when it tries to execute 
JavaScript 
 
Steps to reproduce: Run Konqueror, enable JavaScript in it, open a web page 
that contains JavaScript (eg http://linuxtoday.com) 
 
Workaround: If the following patches are reversed: 
 
cputime-introduce-cputime-fix.patch 
cputime-introduce-cputime.patch 
cputime-missing-pieces.patch 
 
Konqueror works normally on the 2.6.10-rc1-mm2 kernel.
Comment 1 Martin Schwidefsky 2004-11-02 06:56:22 UTC
This is a bug the cputime patch. In kernel/itimer.c, do_setitmer increases the
it_virt_value and it_prof_values by one jiffies if they are not zero. If the
applications does a setitimer(ITMER_VIRTUAL, &itv, NULL) with e.g. 1/100 sec the
timer goes off sometime between 1/100 sec and 2/100 sec. The cputime patch removed
the j++ which caused the timer to go off between 0/100 sec and 1/100 sec. I
never notices this on s390 because I have my micro-second based
virtual/profiling timer that goes off after 1/100 sec of virtual time have
passed (there is no jiffies grid anymore). I readded the increase of 1 jiffy for
it_virt_value and it_prof_value and konqueror works again.
Comment 2 Martin Schwidefsky 2004-11-02 06:57:38 UTC
Created attachment 3931 [details]
Fix do_setitimer