id summary reporter owner description type status component version resolution keywords cc guest host 16417 vboxsf crashes process or VM in case of many file stat operations on shared vboxsf file system in a short time mrtngrnr "We use a vagrant based toolchain to automatically generate VMs for executing unit tests. They run on Ubuntu 16.04 LTS 64-bit hosts, and the VMs themselves contain various different older and newer Linux distributions. We use current VirtualBox 5.1.14 and also the 5.1.14 guest tools. Quite a significant percentage (10-20%) of our VM deployments was not successful. In case of ""default"" paravirtualization using KVM, the whole VM freezes, and the VBox.log file just says: {{{ 00:00:42.027263 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago }}} If using the ""minimal"" paravirtualization, VM operation continues, just the unit test process itself dies (see log below). This happens consistently at the same place where there are many stat() calls made to get the ctime information of many thousands of (empty) cache files on a shared vboxsf file system, before outdated files are supposed to be cleaned up. If I remove this code part, the error does not occur any more. Therefore my (uneducated) assumption is that it could be related to running many stat operations in a short time. Here's the stack trace as found in /var/log/kern.log in the instance. {{{ Jan 21 22:23:14 vagrant kernel: [ 8.021389] vboxsf: Successfully loaded version 5.1.14 (interface 0x00010004) Jan 21 22:23:14 vagrant kernel: [ 8.328536] VBoxService 5.1.14 r112924 (verbosity: 0) linux.amd64 (Jan 16 2017 17:38:46) release log Jan 21 22:23:14 vagrant kernel: [ 8.328536] 00:00:00.000093 main Log opened 2017-01-21T22:23:14.323839000Z Jan 21 22:23:14 vagrant kernel: [ 8.328566] 00:00:00.000154 main OS Product: Linux Jan 21 22:23:14 vagrant kernel: [ 8.328578] 00:00:00.000170 main OS Release: 3.16.0-4-amd64 Jan 21 22:23:14 vagrant kernel: [ 8.328589] 00:00:00.000182 main OS Version: #1 SMP Debian 3.16.39-1 (2016-12-30) Jan 21 22:23:14 vagrant kernel: [ 8.328614] 00:00:00.000193 main Executable: /opt/VBoxGuestAdditions-5.1.14/sbin/VBoxService Jan 21 22:23:14 vagrant kernel: [ 8.328614] 00:00:00.000194 main Process ID: 1028 Jan 21 22:23:14 vagrant kernel: [ 8.328614] 00:00:00.000195 main Package type: LINUX_64BITS_GENERIC Jan 21 22:23:14 vagrant kernel: [ 8.329284] 00:00:00.000860 main 5.1.14 r112924 started. Verbose level = 0 Jan 21 22:27:01 vagrant kernel: [ 233.348410] VBOXGUEST_IOCTL_HGCM_CALL: 64 Failed. rc=-228. Jan 21 22:27:01 vagrant kernel: [ 233.348430] general protection fault: 0000 [#1] SMP Jan 21 22:27:01 vagrant kernel: [ 233.348461] Modules linked in: vboxsf(O) nfsd auth_rpcgss oid_registry nfs_acl nfs lockd fscache sunrpc vboxvideo(O) ttm drm_kms_helper ppdev drm evdev vboxguest(O) crc32_pclmul i2c_piix4 pcspkr i2c_core serio_raw aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd parport_pc battery processor parport video thermal_sys ac button autofs4 ext4 crc16 mbcache jbd2 dm_mod sg sd_mod crc_t10dif crct10dif_generic ata_generic crct10dif_pclmul crct10dif_common crc32c_intel e1000 psmouse ata_piix libata scsi_mod Jan 21 22:27:01 vagrant kernel: [ 233.348614] CPU: 1 PID: 1925 Comm: otrs.UnitTest.p Tainted: G O 3.16.0-4-amd64 #1 Debian 3.16.39-1 Jan 21 22:27:01 vagrant kernel: [ 233.348661] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 Jan 21 22:27:01 vagrant kernel: [ 233.348689] task: ffff8800797bcce0 ti: ffff88007bdcc000 task.ti: ffff88007bdcc000 Jan 21 22:27:01 vagrant kernel: [ 233.348718] RIP: 0010:[] [] VGDrvCommonIoCtl+0x261/0x1bf0 [vboxguest] Jan 21 22:27:01 vagrant kernel: [ 233.348763] RSP: 0018:ffff88007bdcfb98 EFLAGS: 00010282 Jan 21 22:27:01 vagrant kernel: [ 233.348784] RAX: 00000000ffffff1c RBX: 0000a0007bdcfc84 RCX: 0000000000000001 Jan 21 22:27:01 vagrant kernel: [ 233.348813] RDX: 0000000000000000 RSI: 000000000000002f RDI: ffff88007bdcf9a0 Jan 21 22:27:01 vagrant kernel: [ 233.348842] RBP: 5f7c81f4149bd010 R08: 000000000000000a R09: 00000000000001c0 Jan 21 22:27:01 vagrant kernel: [ 233.348870] R10: 0000000000000000 R11: ffff88007bdcf6be R12: 0000b00000000000 Jan 21 22:27:01 vagrant kernel: [ 233.348898] R13: 1b3eed7500000000 R14: 5f7c81f4149bd064 R15: 5f7c81f4149bd010 Jan 21 22:27:01 vagrant kernel: [ 233.348927] FS: 00007ff073ca7700(0000) GS:ffff88007fd00000(0000) knlGS:0000000000000000 Jan 21 22:27:01 vagrant kernel: [ 233.348958] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Jan 21 22:27:01 vagrant kernel: [ 233.348981] CR2: 00007ffec82d3ff8 CR3: 000000007bcd8000 CR4: 00000000000406e0 Jan 21 22:27:01 vagrant kernel: [ 233.349008] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 Jan 21 22:27:01 vagrant kernel: [ 233.349033] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Jan 21 22:27:01 vagrant kernel: [ 233.349072] Stack: Jan 21 22:27:01 vagrant kernel: [ 233.349082] 001041ed149bd010 000003e900000000 00000002000003e9 013aa00300000902 Jan 21 22:27:01 vagrant kernel: [ 233.349114] 0000000000000000 0000000000000000 ffff880023350880 0000006c00000004 Jan 21 22:27:01 vagrant kernel: [ 233.349147] ffff88007bdcfbfc 0000a00000020830 ffff88007b0c6000 ffffffffa03f877c Jan 21 22:27:01 vagrant kernel: [ 233.349178] Call Trace: Jan 21 22:27:01 vagrant kernel: [ 233.349194] [] ? sf_stat+0x5c/0x110 [vboxsf] Jan 21 22:27:01 vagrant kernel: [ 233.349219] [] ? sf_inode_revalidate+0x80/0xd0 [vboxsf] Jan 21 22:27:01 vagrant kernel: [ 233.349246] [] ? __inode_permission+0x22/0xb0 Jan 21 22:27:01 vagrant kernel: [ 233.349269] [] ? link_path_walk+0x256/0x870 Jan 21 22:27:01 vagrant kernel: [ 233.349292] [] ? __d_lookup+0x7a/0x150 Jan 21 22:27:01 vagrant kernel: [ 233.349979] [] ? sf_dentry_revalidate+0x14/0x20 [vboxsf] Jan 21 22:27:01 vagrant kernel: [ 233.350641] [] ? lookup_fast+0x25e/0x2b0 Jan 21 22:27:01 vagrant kernel: [ 233.351302] [] ? path_lookupat+0x155/0x780 Jan 21 22:27:01 vagrant kernel: [ 233.351927] [] ? VbglR0SfCreate+0x7e/0xa0 [vboxsf] Jan 21 22:27:01 vagrant kernel: [ 233.352603] [] ? filename_lookup+0x26/0xc0 Jan 21 22:27:01 vagrant kernel: [ 233.353267] [] ? user_path_at_empty+0x54/0x90 Jan 21 22:27:01 vagrant kernel: [ 233.353855] [] ? from_kgid_munged+0xe/0x20 Jan 21 22:27:01 vagrant kernel: [ 233.354431] [] ? cp_new_stat+0x13a/0x160 Jan 21 22:27:01 vagrant kernel: [ 233.354976] [] ? vfs_fstatat+0x46/0x90 Jan 21 22:27:01 vagrant kernel: [ 233.355536] [] ? SYSC_newstat+0x1a/0x40 Jan 21 22:27:01 vagrant kernel: [ 233.356067] [] ? system_call_fast_compare_end+0x10/0x15 Jan 21 22:27:01 vagrant kernel: [ 233.356577] Code: 01 b9 ff ff ff ff 48 89 da 4c 89 d6 4c 89 ef e8 b6 df ff ff 41 89 c7 0f 1f 00 48 83 c4 40 44 89 f8 5b 41 5c 41 5d 41 5e 41 5f 5d 66 0f 1f 44 00 00 49 83 f8 17 0f 86 34 0c 00 00 48 8d 83 00 Jan 21 22:27:01 vagrant kernel: [ 233.358611] RIP [] VGDrvCommonIoCtl+0x261/0x1bf0 [vboxguest] Jan 21 22:27:01 vagrant kernel: [ 233.359118] RSP Jan 21 22:27:01 vagrant kernel: [ 233.359636] ---[ end trace 54b9778e1a5d744b ]--- }}} For reference, here's the Perl code that is used to cleanup the (empty cache files): {{{ my $Wanted = sub { # Skip nonregular files and directories. return if ( !-f $File::Find::name ); my $Stat = File::stat::stat($File::Find::name); if ( $Stat && ( time() - $Stat->ctime() > $CacheTTLSeconds ) ) { ## no critic unlink $File::Find::name; # Don't die here, this could be removed in the background by another process too. } }; File::Find::find( $Wanted, $CacheDir ); }}} Less often, a similar error occurs during the vagrant provisioning of the instances, where we copy the source code of our project from the /vagrant shared vboxsf folder into the VM. Here just a simple ""cp -r"" is used during the deployment. It could be the same problem: {{{ ==> default: Copying OTRS code to /opt/otrs ==> default: cp: cannot stat ‘/vagrant/Sources/otrs/var/httpd/htdocs/js/thirdparty/ckeditor-4.5.6/plugins/mathjax/lang/cy.js’: Protocol error }}} Please let me know if I should try to provide additional information, and thanks a lot for taking a look at this." defect new shared folders VirtualBox 5.1.14 dusan.vuckovic@… Linux Linux