|Summary:||Crash in XkbSendMap|
|Product:||xorg||Reporter:||Thomas M. <flipwook>|
|Component:||Server/Input/XKB||Assignee:||Tomas Janousek <tomi>|
|Status:||RESOLVED FIXED||QA Contact:||Xorg Project Team <xorg-team>|
|Priority:||medium||CC:||covex, daniel, david, georgiy-kalchev, kpj104, ossi, peter.hutterer, tomi, uwe|
|Version:||7.4 (2008.09)||Keywords:||have-backtrace, patch|
|i915 platform:||i915 features:|
Description Thomas M. 2009-04-28 07:45:26 UTC
Comment 1 Thomas M. 2009-04-28 07:51:56 UTC
possibly related : #16458
Comment 2 Alexis de Lattre 2009-05-14 06:40:13 UTC
Created attachment 25861 [details] Xorg log
Comment 3 Andy Irving 2009-05-18 12:51:01 UTC
i've had this also, very annoying. happens to me when loading oowriter.i've been unable to get a backtrace so far.
Comment 4 Tomas Janousek 2009-05-19 02:34:26 UTC
I can confirm this as well — happens sometimes when loading oowriter. The backtrace I get in Xorg.0.log corresponds to what's said in the first comment. In my case, the difference between the two numbers is 16 as well. I will try to apply the following quickfix, which I think may prevent the server from crashing (but the error is somewhere else, of course): --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -1366,7 +1366,7 @@ unsigned i,len; char *desc,*start; len= (rep->length*4)-(SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply)); - start= desc= (char *)xalloc(len); + start= desc= (char *)xalloc(len + 128); if (!start) return BadAlloc; if ( rep->nTypes>0 ) I will report later.
Comment 5 Tomas Janousek 2009-05-19 06:49:44 UTC
Okay, I can confirm that the patch prevents the X server from crashing. I will further investigate what causes the length to be bigger.
Comment 6 David Campbell 2009-05-19 13:08:13 UTC
I can confirm regularly seeing this problem in Ubuntu Intrepid and Jaunty. See https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/334626
Comment 7 Tomas Janousek 2009-05-20 06:27:10 UTC
Created attachment 26038 [details] [review] fix Okay, I believe the attached patch fixes this issue properly.
Comment 8 Peter Hutterer 2009-05-21 18:12:04 UTC
*** Bug 16458 has been marked as a duplicate of this bug. ***
Comment 9 Peter Hutterer 2009-05-21 18:12:25 UTC
*** Bug 6428 has been marked as a duplicate of this bug. ***
Comment 10 Peter Hutterer 2009-05-21 21:23:41 UTC
Pushed as 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20. Thanks for your time and the patch, it is much appreciated.
Comment 11 Georgiy Kalchev 2009-05-22 05:17:00 UTC
Hello! Thanks for solving this problem. I am also severely hit by this bug. The only question: How do we, end users, apply the patch? I am using openSuSE 11.1 with X.Org X Server version 1.5.2 (released on 2008.10.10) installed. Should I just wait till openSuSE releases a patched X Server via their update repositories? Or should I manually get the sources, apply the patch and compile the X server myself?
Comment 12 Tomas Janousek 2009-05-22 05:42:22 UTC
You could file a bugreport into their bugzilla and have them include this patch in an update, but if you're experiencing the problem every other day, it may be better to apply it yourself. I think the easiest way is grabbing the source package for xserver for your distribution (http://en.opensuse.org/Zypper/Usage#Source_Packages_and_Build_Dependencies), applying the patch (RPM specfiles aren't difficult, but it's more than just doing patch -p1) and building that with rpmbuild.
Comment 13 Georgiy Kalchev 2009-05-22 06:30:11 UTC
(In reply to comment #12) > You could file a bugreport into their bugzilla and have them include this patch > in an update, but if you're experiencing the problem every other day, it may be > better to apply it yourself. > > I think the easiest way is grabbing the source package for xserver for your > distribution > (http://en.opensuse.org/Zypper/Usage#Source_Packages_and_Build_Dependencies), > applying the patch (RPM specfiles aren't difficult, but it's more than just > doing patch -p1) and building that with rpmbuild. > Thanks for your reply, Tomas! Do you know, in what version of X server will this patch be already included? Say, will it be enough to just recompile the core X server, or should I rebuild all the modules/drivers as well? Cheers!
Comment 14 Tomas Janousek 2009-05-22 07:17:13 UTC
Hello, (In reply to comment #13) > Thanks for your reply, Tomas! Do you know, in what version of X server will > this patch be already included? Nope, but I think this patch should be nominated for inclusion in server-1.6-branch — that would mean distributions shipping xserver 1.6 would pick it up soon. > Say, will it be enough to just recompile the core X server, or should I rebuild > all the modules/drivers as well? Core xserver is the only thing you need to patch and build.
Comment 15 Peter Hutterer 2009-05-23 03:58:03 UTC
> Nope, but I think this patch should be nominated for inclusion in > server-1.6-branch — that would mean distributions shipping xserver 1.6 would > pick it up soon. I agree, please add the nomination to the wiki page.
Comment 16 Julien Cristau 2009-05-27 03:17:10 UTC
*** Bug 20081 has been marked as a duplicate of this bug. ***
Comment 17 Rémi Cardona 2009-06-30 12:25:33 UTC
FTR, patch is now in 22.214.171.1242. Cheers