I ran the simple program:
#!/bin/bash
dd if=/dev/urandom of=ooooo
First time ok. THen ctrl-c, and restart again, and immediately it
result in the following trace to the screen:
localhost kernel: ------------[ cut here ]------------
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: invalid opcode: 0000 [#1] SMP
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: Process btrfs-transacti (pid: 4182, ti=d6b65000
task=ecfd74a0 task.ti=d6b65000)
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: Stack: d686bc00 e1037028 e402be00 00000000 00000103
00000000 00916000 00000000
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: 00000fd7 00000000 ddd5c2d8 00000007 d6b65c90
d6b65c40 00917000 00000000
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: 00000000 d6b65ccc f8cba91c 00917000 00000000
00000005 00000000 00000014
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: Call Trace:
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cba91c>] ? cow_file_range+0x15f/0x243 [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cbb051>] ? run_delalloc_range+0x294/0x2b5 [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cc70f2>] ? free_extent_state+0x57/0x5b [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cc8adc>] ? __extent_writepage+0x1a0/0x62f [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8ccac7e>] ? find_first_extent_bit+0x31/0x9e [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c0455899>] ? find_get_pages_tag+0x30/0x73
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c045abd9>] ? write_cache_pages+0x180/0x287
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cc893c>] ? __extent_writepage+0x0/0x62f [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cbb9a9>] ? btrfs_writepages+0x0/0x1d [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cc748d>] ? extent_writepages+0x29/0x46 [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cb9c8e>] ? btrfs_get_extent+0x0/0x70e [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cbb9c1>] ? btrfs_writepages+0x18/0x1d [btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c045ad2a>] ? do_writepages+0x23/0x34
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c04561fa>] ? __filemap_fdatawrite_range+0x5b/0x67
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c04563ce>] ? filemap_fdatawrite+0x15/0x17
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cb76b2>] ? btrfs_write_ordered_inodes+0x8d/0x176
[btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cb85ee>] ? btrfs_commit_transaction+0x27a/0x5c7
[btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c043437d>] ? autoremove_wake_function+0x0/0x33
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cb893b>] ? btrfs_transaction_cleaner+0x0/0xcd
[btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<f8cb89e3>] ? btrfs_transaction_cleaner+0xa8/0xcd
[btrfs]
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c04318a7>] ? run_workqueue+0x6e/0xe7
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c0431fe9>] ? worker_thread+0x0/0xbf
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c043209d>] ? worker_thread+0xb4/0xbf
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c043437d>] ? autoremove_wake_function+0x0/0x33
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c04342a9>] ? kthread+0x3b/0x62
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c043426e>] ? kthread+0x0/0x62
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: [<c0405517>] ? kernel_thread_helper+0x7/0x10
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: ======================Message from syslogd@ at Sun Apr 20
09:13:11 2008 ...
localhost kernel: Code: ff 75 48 ff 75 3c ff 75 38 ff 75 44 ff 75 40
6a 00 6a 00 ff 75 34 ff 75 30 ff 75 0c ff 75 08 e8 10 f9 ff ff 83 c4
40 85 c0 74 04 <0f> 0b eb fe 8b 45 08 8b 55 0c 01 46 68 11 56 6c 8b 4d
bc 01 81
Message from syslogd@ at Sun Apr 20 09:13:11 2008 ...
localhost kernel: EIP: [<f8cb290f>] btrfs_alloc_extent+0x195/0x3e7
[btrfs] SS:ESP 0068:d6b65bdmyrandom_copy
, memory: 400561+26571+1468+13600 data+text+ctx+net, probes: 2
space info full 1
------------[ cut here ]------------
kernel BUG at /sda4/download/linux_linus/btrfs-unstable/extent-tree.c:1756!
invalid opcode: 0000 [#1] SMP
Modules linked in: stap_6a778bab7c7d402cc08c9979544d3590_1643 btrfs
crypto_blkcipher aes_i586 aes_generic ieee80211_crypt_ccmp nls_utf8
loop ipt_MASQUERADE iptable_nat nf_nat bridge autofs4 hidp rfcomm
l2cap bluetooth sunrpc nf_conntrack_netbios_ns nf_conntrack_ipv4
xt_state nf_conntrack ipt_REJECT iptable_filter ip_tables xt_tcpudp
ip6t_REJECT ip6table_filter ip6_tables x_tables cpufreq_ondemand
acpi_cpufreq dm_mirror dm_multipath dm_mod sbs sbshc radeon drm ipv6
snd_intel8x0m snd_intel8x0 snd_ac97_codec snd_seq_dummy ac97_bus
snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss
snd_mixer_oss snd_pcm firewire_ohci b44 firewire_core snd_timer ssb
sdhci video output ipw2200 ieee80211 snd ieee80211_crypt iTCO_wdt mii
mmc_core crc_itu_t iTCO_vendor_support button battery ac soundcore
dcdbas snd_page_alloc i2c_i801 pcspkr joydev i2c_core sr_mod sg cdrom
usb_storage ata_generic ahci ata_piix libata sd_mod scsi_mod ext3 jbd
ehci_hcd ohci_hcd uhci_hcd [last unloaded:
stap_431335f12f682cd4c9e0e02c49215dca_12331]
Pid: 4182, comm: btrfs-transacti Not tainted (2.6.25-rc9 #5)
EIP: 0060:[<f8cb290f>] EFLAGS: 00010286 CPU: 0
EIP is at btrfs_alloc_extent+0x195/0x3e7 [btrfs]
EAX: ffffffe4 EBX: e1037028 ECX: 00000000 EDX: 00000000
ESI: f3a4b144 EDI: 00000001 EBP: d6b65c20 ESP: d6b65bdc
DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process btrfs-transacti (pid: 4182, ti=d6b65000 task=ecfd74a0 task.ti=d6b65000)
Stack: d686bc00 e1037028 e402be00 00000000 00000103 00000000 00916000 00000000
00000fd7 00000000 ddd5c2d8 00000007 d6b65c90 d6b65c40 00917000 00000000
00000000 d6b65ccc f8cba91c 00917000 00000000 00000005 00000000 00000014
Call Trace:
[<f8cba91c>] ? cow_file_range+0x15f/0x243 [btrfs]
[<f8cbb051>] ? run_delalloc_range+0x294/0x2b5 [btrfs]
[<f8cc70f2>] ? free_extent_state+0x57/0x5b [btrfs]
[<f8cc8adc>] ? __extent_writepage+0x1a0/0x62f [btrfs]
[<f8ccac7e>] ? find_first_extent_bit+0x31/0x9e [btrfs]
[<c0455899>] ? find_get_pages_tag+0x30/0x73
[<c045abd9>] ? write_cache_pages+0x180/0x287
[<f8cc893c>] ? __extent_writepage+0x0/0x62f [btrfs]
[<f8cbb9a9>] ? btrfs_writepages+0x0/0x1d [btrfs]
[<f8cc748d>] ? extent_writepages+0x29/0x46 [btrfs]
[<f8cb9c8e>] ? btrfs_get_extent+0x0/0x70e [btrfs]
[<f8cbb9c1>] ? btrfs_writepages+0x18/0x1d [btrfs]
[<c045ad2a>] ? do_writepages+0x23/0x34
[<c04561fa>] ? __filemap_fdatawrite_range+0x5b/0x67
[<c04563ce>] ? filemap_fdatawrite+0x15/0x17
[<f8cb76b2>] ? btrfs_write_ordered_inodes+0x8d/0x176 [btrfs]
[<f8cb85ee>] ? btrfs_commit_transaction+0x27a/0x5c7 [btrfs]
[<c043437d>] ? autoremove_wake_function+0x0/0x33
[<f8cb893b>] ? btrfs_transaction_cleaner+0x0/0xcd [btrfs]
[<f8cb89e3>] ? btrfs_transaction_cleaner+0xa8/0xcd [btrfs]
[<c04318a7>] ? run_workqueue+0x6e/0xe7
[<c0431fe9>] ? worker_thread+0x0/0xbf
[<c043209d>] ? worker_thread+0xb4/0xbf
[<c043437d>] ? autoremove_wake_function+0x0/0x33
[<c04342a9>] ? kthread+0x3b/0x62
[<c043426e>] ? kthread+0x0/0x62
[<c0405517>] ? kernel_thread_helper+0x7/0x10
======================Code: ff 75 48 ff 75 3c ff 75 38 ff 75 44 ff 75 40 6a 00
6a 00 ff 75
34 ff 75 30 ff 75 0c ff 75 08 e8 10 f9 ff ff 83 c4 40 85 c0 74 04 <0f>
0b eb fe 8b 45 08 8b 55 0c 01 46 68 11 56 6c 8b 4d bc 01 81
EIP: [<f8cb290f>] btrfs_alloc_extent+0x195/0x3e7 [btrfs] SS:ESP
0068:d6b65bdc
---[ end trace f7326784ebd1c536 ]---
And the extent-tree.c:1756 as mentioned are extracted as follows:
1690 int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
1697 {
1741 new_hint = max(hint_byte, root->fs_info->alloc_start);
1742 if (new_hint <
btrfs_super_total_bytes(&info->super_copy))
1743 hint_byte = new_hint;
1744
1745 WARN_ON(num_bytes < root->sectorsize);
1746 ret = find_free_extent(trans, root, num_bytes, empty_size,
1747 search_start, search_end, hint_byte, ins,
1748 trans->alloc_exclude_start,
1749 trans->alloc_exclude_nr, data);
1750
1751 if (ret == -ENOSPC && num_bytes > min_alloc_size) {
1752 num_bytes = num_bytes >> 1;
1753 num_bytes = max(num_bytes, min_alloc_size);
1754 goto again;
1755 }
1756 BUG_ON(ret);
1757 if (ret)
1758 return ret;
1759
1760 /* block accounting for super block */
1761 super_used = btrfs_super_bytes_used(&info->super_copy);
1762 btrfs_set_super_bytes_used(&info->super_copy,
super_used + num_bytes);
1763
1764 /* block accounting for root item */
1765 root_used = btrfs_root_used(&root->root_item);
1766 btrfs_set_root_used(&root->root_item, root_used +
num_bytes);
1767
1768 clear_extent_dirty(&root->fs_info->free_space_cache,
df info as follows:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc1 1004028 1956 1002072 1% /mnt/btrfs
Any possible hints?
--
Regards,
Peter Teoh