Bug 703089

Summary: X.org cannot handle separate "/var" and "/var/tmp" file systems.
Product: [openSUSE] openSUSE 11.4 Reporter: Dennis Olsson <DOlsson>
Component: X.OrgAssignee: E-mail List <xorg-maintainer-bugs>
Status: RESOLVED WONTFIX QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Critical    
Priority: P5 - None CC: D.Olsson, eich
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.4   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dennis Olsson 2011-06-30 07:33:18 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

I have (as always the past 20+ years) setup a system with separate "/", "/var" and "/var/tmp" file systems and have had no problems with such a setup with X11, now X.org.

But, with openSUSE 11.4 it is no longer possible to use the X.org server (it refuses to accept any keyboard input), when the file systems "/var" and "/var/tmp" are on separate mount points, extract from "Xorg.0.log":

...
[  1777.401] (II) XKB: generating xkmfile /var/lib/xkb/compiled/server-8AA988DD479FAABEC4FC3CCCF4CC29B4948840B4.xkm
[  1777.481] [xkb] Can't rename /var/tmp/fileJWpavN to /var/lib/xkb/compiled/server-8AA988DD479FAABEC4FC3CCCF4CC29B4948840B4.xkm, error: Invalid cross-device link
[  1777.481] (EE) XKB: Couldn't compile keymap
[  1777.481] XKB: Failed to compile keymap
[  1777.481] Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
[  1777.481] 
Fatal server error:
[  1777.481] Failed to activate core devices.
...

Having "/var" and "/var/tmp" on the same file system, it works (natually;-).

Reproducible: Always

Steps to Reproduce:
1. Install a fresh openSUSE 11.4 with separate "/var" and "/var/tmp" mount points.
2. rcxdm stop
3. rm -f /var/lib/xkb/compiled/server-*
4. rcxdm start
5. Observe that only the mouse works, but no keyboard input is possible.

Actual Results:  
In "/var/log/Xorg.0.log" you will now have:
[  1777.401] (II) XKB: generating xkmfile /var/lib/xkb/compiled/server-8AA988DD479FAABEC4FC3CCCF4CC29B4948840B4.xkm
[  1777.481] [xkb] Can't rename /var/tmp/fileJWpavN to /var/lib/xkb/compiled/server-8AA988DD479FAABEC4FC3CCCF4CC29B4948840B4.xkm, error: Invalid cross-device link
[  1777.481] (EE) XKB: Couldn't compile keymap
[  1777.481] XKB: Failed to compile keymap

Expected Results:  
[  2349.886] (II) XKB: generating xkmfile /var/lib/xkb/compiled/server-8AA988DD479FAABEC4FC3CCCF4CC29B4948840B4.xkm
...
[  2349.929] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
[  2349.929] (**) Option "xkb_rules" "evdev"
[  2349.929] (**) Option "xkb_model" "latitude"
[  2349.929] (**) Option "xkb_layout" "de"
[  2349.931] (II) XKB: generating xkmfile /var/lib/xkb/compiled/server-1AFDF645DC837E3CC725F5E8A927350C755D0E99.xkm
...
[  2350.765] (II) config/udev: Adding input device Dell WMI hotkeys (/dev/input/event9)
[  2350.765] (**) Dell WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[  2350.765] (**) Dell WMI hotkeys: Applying InputClass "LocalKeyboard"
[  2350.765] (**) Dell WMI hotkeys: always reports core events
[  2350.765] (**) Dell WMI hotkeys: Device: "/dev/input/event9"
[  2350.772] (--) Dell WMI hotkeys: Found keys
[  2350.772] (II) Dell WMI hotkeys: Configuring as keyboard
[  2350.772] (II) XINPUT: Adding extended input device "Dell WMI hotkeys" (type: KEYBOARD)
[  2350.772] (**) Option "xkb_rules" "evdev"
[  2350.772] (**) Option "xkb_model" "latitude"
[  2350.772] (**) Option "xkb_layout" "de"
[  2351.147] (II) XKB: generating xkmfile /var/lib/xkb/compiled/server-C37DE65A5B365D52A52EC1F2CB656087341C7EF8.xkm

The work-around that I used was:

1. telinit 3
2. umount /var/tmp
3. rcxdm start
4. rcxdm stop
5. mount /var/tmp
6. telinit 5

But, what really should be done, is to fix the X.org server so that it (once again) is capable of handling the fact that the "/var", "/var/lib" and "/var/tmp" directory might not be found on the same file system!!
Comment 1 Matthias Hopf 2011-06-30 11:15:36 UTC
I have a setup here with /var/tmp symlinked to /space/tmp, /space being a separate mountpoint. I just works, so something must be different on your system.

Can you 'rpm -q xorg-x11'?
Comment 2 Stefan Dirsch 2011-06-30 11:17:38 UTC
Hmm. Cannot reproduce that issue here. Also I can't find the error message

  "Can't rename ..."

neither in xorg-server nor in xkbcomp sources. :-(
Comment 3 Dennis Olsson 2011-06-30 11:52:19 UTC
Reply to comment 1:

root@denmark(pts/3):~ 13:51:32 2500 # rpm -q xorg-x11
xorg-x11-7.6-43.44.1.x86_64
Comment 4 Dennis Olsson 2011-07-26 12:43:26 UTC
Reply to comment 2:

Well, after having downloaded the source package "xorg-x11-server-7.6_1.9.3-15.18.4.src.rpm", unpackaged and done a search after "Can't rename", I get a match in the file:

./cache-xkbcomp-output-for-fast-start-up.patch:+                ErrorF("[xkb] Can't rename %s to %s, error: %s\n",

In other words, due to a local openSUSE patch, the X.org server is no longer capable of running on systems, where the "/var" and "/var/tmp" directories are mounted on separate partitions.

Please, fix this ASAP -- Thanx!  ;-)
Comment 5 Stefan Dirsch 2011-07-26 14:32:47 UTC
Valid point. Ouch. Additional patch. I've searched in the upstream sources, not in our patches. Sigh.
Comment 6 Stefan Dirsch 2011-09-01 14:12:33 UTC
Unfortunately we do not have the ressources to address that issue
still for openSUSE 11.4. Could you please test again with
a current Milestone of openSUSE 12.1, whether the issue still
exists and give me feedback about the result? Thanks.
Comment 7 Stefan Dirsch 2011-10-12 13:51:14 UTC
I'm assuming the issue still exists, although we never were able to reproduce it. Not sure why ...
Comment 8 Egbert Eich 2011-10-12 14:08:24 UTC
This is a fallout of the infamous cache-xkbcomp-output-for-fast-start-up.patch from our Moblin friends. In principle this patch does a valid thing. It however doesn't take into account some non-standard situations.
I don't think we apply this patch to 12.1 currently but it should be reworked and fixed.
Comment 9 Stefan Dirsch 2011-10-12 14:38:08 UTC
(In reply to comment #8)
> This is a fallout of the infamous cache-xkbcomp-output-for-fast-start-up.patch
> from our Moblin friends. In principle this patch does a valid thing. It however
> doesn't take into account some non-standard situations.
> I don't think we apply this patch to 12.1 currently but it should be reworked
> and fixed.

Indeed. We currently (openSUSE 12.1) do *not* apply this patch, but still did apply it on openSUSE 11.4. That's probably the reason we weren't able to reproduce the issue, since we apparently already tested with the latest xorg-x11-server package.
Comment 10 Stefan Dirsch 2013-03-05 10:25:44 UTC
openSUSE 11.4 is no longer supported. Feel free to reopen, if the issue still exists with openSUSE 12.3. Thanks.