linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs does not work on usermode linux
@ 2011-04-10 10:37 Sergei Trofimovich
  2011-04-10 15:42 ` Sergei Trofimovich
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Trofimovich @ 2011-04-10 10:37 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 2237 bytes --]

According to https://btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDB
UML did work once.

Now it corrupts data and triggers BUG_ON once you
start to use it. I tried both 2.6.38 and 2.6.39-rc2 (x86_64)
I need some help to track it down.

doing 'touch `seq 1 11`; rm 11' kills the kernel:

#run> mount -t btrfs /dev/ubda /mnt/btr/
[    2.220000] device fsid 754599771c9b69eb-66689f77c1542bb9 devid 1 transid 7 /dev/ubda
#status: 0
#run> cd /mnt/btr/
#status: 0
touching files 1 .. 11
#run> touch 1 2 3 4 5 6 7 8 9 10 11
#status: 0
#run> ls
[    2.220000] btrfS: invalid dir item name len: 12594
[    2.220000] btrfS: invalid dir item name len: 0
[    2.220000] btrfS: invalid dir item name len: 0
11
#status: 0
Fasten your belts: removing file 11
#run> rm 11
[    2.220000] btrfs failed to delete reference to 11, inode 267 parent 256
[    2.220000] Kernel panic - not syncing: Kernel mode signal 4
[    2.220000] Call Trace: 
[    2.220000] 6024b918:  [<601b2567>] panic+0xea/0x1dc
[    2.220000] 6024b9c8:  [<601b491e>] _raw_spin_unlock_irqrestore+0x18/0x1c
[    2.220000] 6024b9e8:  [<60017d00>] free_irqs+0x74/0xde
[    2.220000] 6024ba18:  [<60015faa>] relay_signal+0x38/0x79
[    2.220000] 6024ba28:  [<60013c8e>] sigio_handler+0x5a/0x60
[    2.220000] 6024ba48:  [<6001f224>] sig_handler_common+0x84/0x98
[    2.220000] 6024ba68:  [<6001f2d1>] real_alarm_handler+0x3c/0x3e
[    2.220000] 6024baf0:  [<600579f7>] get_page_from_freelist+0x129/0x478
[    2.220000] 6024bb78:  [<6001f36a>] sig_handler+0x30/0x3b
[    2.220000] 6024bb98:  [<6001f59c>] handle_signal+0x6d/0xa3
[    2.220000] 6024bbe8:  [<600203b0>] hard_handler+0x10/0x14
[    2.220000] 6024bca8:  [<600e04c3>] btrfs_unlink+0x77/0xef

==

I've cooked whole root into small archive (3.1MB):
https://slyfox.ath.cx/btrfs/linux-2.6-um-x86_64-fs.tar.gz

You just need to start './run' to enter into UML root fs
and there to issue ./kill_btr to get fault above.

Archive contains minimal .config for kernel 2.6.39-rc2, statically linked
busybox binary and fresh image of btrfs.
It also has tiny script, which will help you to generate the same
rootfs if you are afraid to run suspicious binaries.

-- 

  Sergei

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-04-13 20:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 10:37 btrfs does not work on usermode linux Sergei Trofimovich
2011-04-10 15:42 ` Sergei Trofimovich
2011-04-10 20:06   ` Sergei Trofimovich
2011-04-10 20:24     ` [PATCH] " Sergei Trofimovich
2011-04-10 20:58       ` [PATCH v2] " Sergei Trofimovich
2011-04-11 15:37         ` Josef Bacik
2011-04-11 19:44           ` [PATCH v3] " Sergei Trofimovich
2011-04-11 19:49             ` Niklas Schnelle
2011-04-11 19:50             ` Josef Bacik
2011-04-12 21:23               ` Sergei Trofimovich
2011-04-13 11:32                 ` Chris Mason
2011-04-13 20:12                   ` Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).