<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29954</bug_id>
          
          <creation_ts>2009-10-01 01:14:04 -0700</creation_ts>
          <short_desc>[MIPS] WebKit SIGBUS when destroying old page (closing tab or simply reloading a web page)</short_desc>
          <delta_ts>2014-09-30 03:12:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Michael Heide">michael.heide</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>deepak.m</cc>
    
    <cc>gnome</cc>
    
    <cc>jacob</cc>
    
    <cc>mrobinson</cc>
    
    <cc>petr.pisar</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>151478</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Heide">michael.heide</who>
    <bug_when>2009-10-01 01:14:04 -0700</bug_when>
    <thetext>I&apos;m trying to use webkit with a Loongson 2F machine (Fuloong 2F)
(MIPS64 N32 with Loongson specific instructions).
I&apos;m using Gentoo Linux and I tried arora (qt-webkit 4.5.2-r1) and 
midori (webkit-gtk 1.1.10). Both are crashing with the similar Bus Error
when closing tabs or loading a new web page in an old tab (i.e. clicking
on a link). Middleclicking a link, i.e. open in a new tab, is working fine.
backtraces:

(midori, webkit-gtk)
Program received signal SIGBUS, Bus error.
[Switching to Thread 0x2fc28eb0 (LWP 1181)]
0x2c6ed84c in WebCore::TimerBase::setNextFireTime (this=0x111a0364, newTime=0)
    at WebCore/platform/Timer.cpp:302
302     WebCore/platform/Timer.cpp: No such file or directory.
        in WebCore/platform/Timer.cpp
Current language:  auto; currently c++
(gdb) bt
#0  0x2c6ed84c in WebCore::TimerBase::setNextFireTime (this=0x111a0364, 
    newTime=0) at WebCore/platform/Timer.cpp:302
#1  0x2c6ecf94 in WebCore::TimerBase::stop (this=0x111a0364)
    at WebCore/platform/Timer.cpp:197
#2  0x2c6ecb10 in ~TimerBase (this=0x111a0364)
    at WebCore/platform/Timer.cpp:180
#3  0x2c94a2fc in ~Timer (this=0x111a0364) at ./WebCore/platform/Timer.h:90
#4  0x2c943250 in ~RenderTextControlSingleLine (this=0x111a02c4)
    at WebCore/rendering/RenderTextControlSingleLine.cpp:70
#5  0x2c8f0708 in WebCore::RenderObject::arenaDelete (this=0x111a02c4, 
[...]

(arora, qt-webkit)
Program received signal SIGBUS, Bus error.
[Switching to Thread 0x2aace200 (LWP 6063)]
0x2b5ab47c in WebCore::TimerBase::setNextFireTime ()
   from /usr/lib/qt4/libQtWebKit.so.4
(gdb) bt
#0  0x2b5ab47c in WebCore::TimerBase::setNextFireTime ()
   from /usr/lib/qt4/libQtWebKit.so.4
#1  0x2b5ab124 in WebCore::TimerBase::stop ()
   from /usr/lib/qt4/libQtWebKit.so.4
#2  0x2b5aaec0 in WebCore::TimerBase::~TimerBase ()
   from /usr/lib/qt4/libQtWebKit.so.4
#3  0x2b728218 in WebCore::Timer&lt;WebCore::RenderTextControlSingleLine&gt;::~Timer
    () from /usr/lib/qt4/libQtWebKit.so.4
#4  0x2b722550 in WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine () from /usr/lib/qt4/libQtWebKit.so.4
#5  0x2b6dcd1c in WebCore::RenderObject::arenaDelete ()
   from /usr/lib/qt4/libQtWebKit.so.4
#6  0x2b6dca48 in WebCore::RenderObject::destroy ()
   from /usr/lib/qt4/libQtWebKit.so.4
[...]

(If you tell me I can upload longer backtraces or other gdb outputs)
 
The bus error occurs while reading the value in m_nextFireTime:
&quot;double oldTime = m_nextFireTime;&quot; -&gt; SIGBUS. I&apos;m not a developer
so I cannot debug it by myself, but I added the following at the beginning 
of void TimerBase::setNextFireTime(double newTime):
printf(&quot; m_nextFireTimeAddress:%i \n&quot;,&amp;m_nextFireTime); fflush(stdout);
printf(&quot; m_nextFireTime:%e \n&quot;,m_nextFireTime); fflush(stdout);

Webkit now prints many of those messages, as long as I do not close a tab or
load a new page in an existing tab. It seems there are many timers destroyed 
successfully. But if I close a tab or simply click a link in an existing web 
page which opens in the current window, the last line printed before
SIGBUS is m_nextFireTimeAddress:xxx. The address printed is always near 
all those adresses printed before, so for me it seems it could be a valid one.
(btw: it&apos;s a 32 bit binary, but the kernel is 64bit. Is &quot;%i&quot; right then??)
But while many addresses printed without crashing webkit are printed multiple 
times, the crashing one I cannot find upwards.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>243638</commentid>
    <comment_count>1</comment_count>
    <who name="Jake Knickerbocker">jacob</who>
    <bug_when>2010-06-28 03:03:32 -0700</bug_when>
    <thetext>I&apos;m hitting this same issue on an older build (r44552) and was able to get rid of the SIGBUS crash by using a patch very similar to one used for Sparc as listed in bug 19946. 

https://bugs.webkit.org/show_bug.cgi?id=19946

This involves dealing with alignment in the Arena memory management and solves the problem (I think), and I am able click links and browse, but hitting pages with lots of content causes a SIGSEGV consistently.  No stability.  

I&apos;m curious to know if there is a good solution to this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264663</commentid>
    <comment_count>2</comment_count>
    <who name="deepak">deepak.m</who>
    <bug_when>2010-08-14 02:34:54 -0700</bug_when>
    <thetext>Even I am facing same issue .. My browser doesnt have any tabs , but whenver i click on new links it crashes. I found many bug topics related to alignment issues on mips, following link helped in solve many alignment warnings , but still im getting bus error :(

https://bugs.webkit.org/show_bug.cgi?id=29415 https://bugs.webkit.org/show_bug.cgi?id=38045

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>310438</commentid>
    <comment_count>3</comment_count>
    <who name="Petr Pisar">petr.pisar</who>
    <bug_when>2010-11-17 12:12:22 -0800</bug_when>
    <thetext>webkit-gtk-1.2.5 inside Midori affected too (MIPS64 with n32 user space, Loongson processor, Gentoo).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>431493</commentid>
    <comment_count>4</comment_count>
      <attachid>99530</attachid>
    <who name="Michał Masłowski">mtjm</who>
    <bug_when>2011-07-01 15:43:33 -0700</bug_when>
    <thetext>Created attachment 99530
patch enabling the fix for other architectures on MIPS N32

This patch for WebKit GTK 1.4.1 enables treating MIPS N32 as MIPS, so the alignment fix for O32 is used.  It also disables JIT on MIPS N32, since it needs a nonavailable file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>988546</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-03-08 03:58:47 -0800</bug_when>
    <thetext>Attachment 99530 did not pass style-queue:


Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>998970</commentid>
    <comment_count>6</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2014-04-08 18:17:29 -0700</bug_when>
    <thetext>Still a problem?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>99530</attachid>
            <date>2011-07-01 15:43:33 -0700</date>
            <delta_ts>2011-07-01 15:43:33 -0700</delta_ts>
            <desc>patch enabling the fix for other architectures on MIPS N32</desc>
            <filename>fix-mips-n32.patch</filename>
            <type>text/plain</type>
            <size>1085</size>
            <attacher name="Michał Masłowski">mtjm</attacher>
            
              <data encoding="base64">L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