Segmentation Error After mounting vboxsf

Discussions about using Linux guests in VirtualBox.
Post Reply
virtualboxnewbie
Posts: 22
Joined: 25. Aug 2012, 08:23

Segmentation Error After mounting vboxsf

Post by virtualboxnewbie »

Dear all,

Host OS: Windows 10
Guest OS: suse 10 sp4
VBox: 5.1.12

Code: Select all

sudo mount -t vboxsf -o rw,uid=1000,gid=1000 yury /media/sf_yury

Code: Select all

suse104-10205-ee-si:~ # df /media/sf_yury/
Filesystem           1K-blocks      Used Available Use% Mounted on
Killed

Why am I getting such error after mounting vboxsf?

here's what my tail -f log says
before and on mounting

Code: Select all


lag' => 'i'                         },           'ostarget' => {                           'kind' => 'mandatory',                           'value' => 'SUSE Linux Enterprise Server 10.4 (x86_64)',                           'flag' => 'i'                         },           'processor' => {                            'kind' => 'mandatory',                            'value' => 'x86_64',                            'flag' => 'i'                          },           'platform' => {                           'kind' => 'mandatory',                           'value' => 'x86_64',                           'flag' => 'i'                         }         };
Jun 19 15:55:52 suse104-10205-ee-si suse_register[4284]: Products Dump: $VAR1 = [];
Jun 19 15:55:52 suse104-10205-ee-si suse_register[4284]: Execute curl command failed with '35':  curl: (35) error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm (4)
Jun 19 15:55:55 suse104-10205-ee-si kernel: eth0: no IPv6 routers present
Jun 19 15:55:55 suse104-10205-ee-si kernel: eth2: no IPv6 routers present
Jun 19 15:55:55 suse104-10205-ee-si kernel: eth1: no IPv6 routers present
Jun 19 15:58:57 suse104-10205-ee-si kernel: Losing some ticks... checking if CPU frequency changed.
Jun 19 15:59:03 suse104-10205-ee-si sshd[4706]: Accepted keyboard-interactive/pam for root from 10.0.2.2 port 59939 ssh2
Jun 19 15:59:27 suse104-10205-ee-si sshd[4741]: Accepted keyboard-interactive/pam for root from 10.0.2.2 port 59961 ssh2

Jun 19 16:00:55 suse104-10205-ee-si sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/mount -t vboxsf -o rw,uid=1000,gid=1000 yury /media/sf_yury

after mounting

Code: Select all


Jun 19 16:01:44 suse104-10205-ee-si sshd[4827]: Accepted keyboard-interactive/pam for root from 10.0.2.2 port 60071 ssh2
Jun 19 16:02:39 suse104-10205-ee-si kernel: Unable to handle kernel paging request at 0000000a426b2038 RIP:
Jun 19 16:02:39 suse104-10205-ee-si kernel: <ffffffff8828db81>{:vboxsf:VbglR0SfFsInfo+45}
Jun 19 16:02:39 suse104-10205-ee-si kernel: PGD 109a65067 PUD 0
Jun 19 16:02:39 suse104-10205-ee-si kernel: Oops: 0000 [1]
Jun 19 16:02:39 suse104-10205-ee-si kernel: last sysfs file: /devices/system/cpu/cpu0/cache/index0/shared_cpu_map
Jun 19 16:02:39 suse104-10205-ee-si kernel: CPU 0
Jun 19 16:02:39 suse104-10205-ee-si kernel: Modules linked in: raw ipv6 snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device af_packet vboxsf vboxguest dock button battery ac apparmor loop usbhid i2c_piix4 snd_intel8x0 snd_ac97_codec snd_ac97_bus i2c_core snd_pcm snd_timer snd soundcore snd_page_alloc ide_cd cdrom mptctl e1000 ohci_hcd ehci_hcd usbcore ext3 jbd ata_piix ahci libata dm_snapshot edd dm_mod fan thermal processor sg mptspi mptscsih mptbase scsi_transport_spi piix sd_mod scsi_mod ide_disk ide_core
Jun 19 16:02:39 suse104-10205-ee-si kernel: Pid: 4862, comm: df Tainted: GF    U 2.6.16.60-0.85.1-default #1
Jun 19 16:02:39 suse104-10205-ee-si kernel: RIP: 0010:[<ffffffff8828db81>] <ffffffff8828db81>{:vboxsf:VbglR0SfFsInfo+45}
Jun 19 16:02:39 suse104-10205-ee-si kernel: RSP: 0018:ffff8101091b5cc8  EFLAGS: 00010282
Jun 19 16:02:39 suse104-10205-ee-si kernel: RAX: 0000000000000007 RBX: ffff8101091b5d74 RCX: 0000000000000010
Jun 19 16:02:39 suse104-10205-ee-si kernel: RDX: 0000000000000000 RSI: 0000000a426b2038 RDI: ffffffff88293580
Jun 19 16:02:39 suse104-10205-ee-si kernel: RBP: ffff8101091b5da8 R08: ffff8101091b5d74 R09: ffff8101091b5d48
Jun 19 16:02:39 suse104-10205-ee-si kernel: R10: ffff81011f270007 R11: 000000000050c0a0 R12: ffff8101091b5ed8
Jun 19 16:02:39 suse104-10205-ee-si kernel: R13: 000000000050c080 R14: 0000000000000000 R15: 0000000000000002
Jun 19 16:02:39 suse104-10205-ee-si kernel: FS:  00002ae1d4ac36e0(0000) GS:ffffffff8039c000(0000) knlGS:0000000000000000
Jun 19 16:02:39 suse104-10205-ee-si kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 19 16:02:39 suse104-10205-ee-si kernel: CR2: 0000000a426b2038 CR3: 000000010b1a4000 CR4: 00000000000006e0
Jun 19 16:02:39 suse104-10205-ee-si kernel: Process df (pid: 4862, threadinfo ffff8101091b4000, task ffff81011d5b1790)
Jun 19 16:02:39 suse104-10205-ee-si kernel: Stack: 0000000700000000 0000000500000009 0000000000000001 ffff81011f270000
Jun 19 16:02:39 suse104-10205-ee-si kernel:        ffff8101091b5e48 ffffffff80186d05 ffff81011f02b6c0 0000000000000000
Jun 19 16:02:39 suse104-10205-ee-si kernel:        ffff81011f005dc0 ffffffff8017c51e
Jun 19 16:02:39 suse104-10205-ee-si kernel: Call Trace: <ffffffff80186d05>{mntput_no_expire+29}
Jun 19 16:02:39 suse104-10205-ee-si kernel:        <ffffffff8017c51e>{link_path_walk+214} <ffffffff8828c111>{:vboxsf:sf_get_volume_info+52}
Jun 19 16:02:39 suse104-10205-ee-si kernel:        <ffffffff8016d074>{vfs_statfs+108} <ffffffff8016d1d5>{vfs_statfs_native+19}
Jun 19 16:02:39 suse104-10205-ee-si kernel:        <ffffffff8016d2a0>{sys_statfs+63} <ffffffff80229694>{tty_write+552}
Jun 19 16:02:39 suse104-10205-ee-si kernel:        <ffffffff8010aba2>{system_call+126}
Jun 19 16:02:39 suse104-10205-ee-si kernel:
Jun 19 16:02:39 suse104-10205-ee-si kernel: Code: 8b 06 48 89 e6 48 89 54 24 24 c7 44 24 20 02 00 00 00 ba 60
Jun 19 16:02:39 suse104-10205-ee-si kernel: RIP <ffffffff8828db81>{:vboxsf:VbglR0SfFsInfo+45} RSP <ffff8101091b5cc8>
Jun 19 16:02:39 suse104-10205-ee-si kernel: CR2: 0000000a426b2038



how to resolve the above error? many thanks in advance!
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: Segmentation Error After mounting vboxsf

Post by frank »

Could you attach the compiled vboxsf.ko binary?
virtualboxnewbie
Posts: 22
Joined: 25. Aug 2012, 08:23

Re: Segmentation Error After mounting vboxsf

Post by virtualboxnewbie »

Dear Frank,

can u tell me what you mean? I can find the location, but I don't think that's what you what. I guess what u wants is the log for compiling the binaries.

many thanks in advance!
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: Segmentation Error After mounting vboxsf

Post by frank »

Please look for a file named vboxsf.ko in /lib/modules/$(uname -r) in the guest! Your report contains kernel addresses and these addresses make only sense if I know the actual code. The vboxsf.ko binary file should be enough to make some sense from the addresses...
virtualboxnewbie
Posts: 22
Joined: 25. Aug 2012, 08:23

Re: Segmentation Error After mounting vboxsf

Post by virtualboxnewbie »

tailing before mounting

Code: Select all

[];
Jun 19 22:05:23 suse104-10205-ee-si suse_register[4278]: Execute curl command failed with '6':  curl: (6) Couldn't resolve host 'secure-www.novell.com' (4)
Jun 19 22:05:23 suse104-10205-ee-si suse_register[4278]: Commandline params: no-optional:1  forceregistration:0  no-hw-data:1 batch:1
Jun 19 22:05:23 suse104-10205-ee-si suse_register[4278]: Argument Dump: $VAR1 = {           'timezone' => {                           'kind' => 'mandatory',                           'value' => 'Asia/Singapore',                           'flag' => 'i'                         },           'ostarget' => {                           'kind' => 'mandatory',                           'value' => 'SUSE Linux Enterprise Server 10.4 (x86_64)',                           'flag' => 'i'                         },           'processor' => {                            'kind' => 'mandatory',                            'value' => 'x86_64',                            'flag' => 'i'                          },           'platform' => {                           'kind' => 'mandatory',                           'value' => 'x86_64',                           'flag' => 'i'                         }         };
Jun 19 22:05:23 suse104-10205-ee-si suse_register[4278]: Products Dump: $VAR1 = [];
Jun 19 22:05:23 suse104-10205-ee-si suse_register[4278]: Execute curl command failed with '6':  curl: (6) Couldn't resolve host 'secure-www.novell.com' (4)
Jun 19 22:05:27 suse104-10205-ee-si sshd[4720]: Accepted keyboard-interactive/pam for root from 10.0.2.2 port 61576 ssh2
Jun 19 22:06:03 suse104-10205-ee-si kernel: e1000: eth0: e1000_watchdog_task: NIC Link is Down
Jun 19 22:06:08 suse104-10205-ee-si kernel: e1000: eth0: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

Code: Select all

suse104-10205-ee-si:~ # sudo mount -t vboxsf -o rw,uid=1000,gid=1000 yury /media/sf_yury
You have new mail in /var/mail/root
/var/log/messages during mounting

Code: Select all

Jun 19 22:07:46 suse104-10205-ee-si sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/bin/mount -t vboxsf -o rw,uid=1000,gid=1000 yury /media/sf_yury
df -hT

Code: Select all

suse104-10205-ee-si:~ # df -hT /media/sf_yury
Filesystem    Type    Size  Used Avail Use% Mounted on
Killed

/var/log/messages after df -hT

Code: Select all

df Jun 19 22:08:41 suse104-10205-ee-si kernel: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
Jun 19 22:08:41 suse104-10205-ee-si kernel: <ffffffff8828bb81>{:vboxsf:VbglR0SfFsInfo+45}
Jun 19 22:08:41 suse104-10205-ee-si kernel: PGD 10b14f067 PUD 10b632067 PMD 0
Jun 19 22:08:41 suse104-10205-ee-si kernel: Oops: 0000 [1]
Jun 19 22:08:41 suse104-10205-ee-si kernel: last sysfs file: /devices/system/cpu/cpu0/cache/index0/shared_cpu_map
Jun 19 22:08:41 suse104-10205-ee-si kernel: CPU 0
Jun 19 22:08:41 suse104-10205-ee-si kernel: Modules linked in: raw snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device ipv6 af_packet vboxsf vboxguest dock button battery ac apparmor usbhid loop ohci_hcd ide_cd cdrom snd_intel8x0 i2c_piix4 i2c_core e1000 snd_ac97_codec snd_ac97_bus ehci_hcd snd_pcm snd_timer snd soundcore snd_page_alloc usbcore mptctl ext3 jbd ata_piix ahci libata dm_snapshot edd dm_mod fan thermal processor sg mptspi mptscsih mptbase scsi_transport_spi piix sd_mod scsi_mod ide_disk ide_core
Jun 19 22:08:41 suse104-10205-ee-si kernel: Pid: 4777, comm: df Tainted: GF    U 2.6.16.60-0.85.1-default #1
Jun 19 22:08:41 suse104-10205-ee-si kernel: RIP: 0010:[<ffffffff8828bb81>] <ffffffff8828bb81>{:vboxsf:VbglR0SfFsInfo+45}
Jun 19 22:08:41 suse104-10205-ee-si kernel: RSP: 0018:ffff81010b62dcc8  EFLAGS: 00010282
Jun 19 22:08:41 suse104-10205-ee-si kernel: RAX: 0000000000000001 RBX: ffff81010b62dd74 RCX: 0000000000000010
Jun 19 22:08:41 suse104-10205-ee-si kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff88291580
Jun 19 22:08:41 suse104-10205-ee-si kernel: RBP: ffff81010b62dda8 R08: ffff81010b62dd74 R09: ffff81010b62dd48
Jun 19 22:08:41 suse104-10205-ee-si kernel: R10: ffff81010460e007 R11: 00007fff2103d48b R12: ffff81010b62ded8
Jun 19 22:08:41 suse104-10205-ee-si kernel: R13: 000000000050c120 R14: 000000000050c000 R15: 0000000000000003
Jun 19 22:08:41 suse104-10205-ee-si kernel: FS:  00002b873c4386e0(0000) GS:ffffffff8039c000(0000) knlGS:0000000000000000
Jun 19 22:08:41 suse104-10205-ee-si kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Jun 19 22:08:41 suse104-10205-ee-si kernel: CR2: 0000000000000000 CR3: 000000010a600000 CR4: 00000000000006e0
Jun 19 22:08:41 suse104-10205-ee-si kernel: Process df (pid: 4777, threadinfo ffff81010b62c000, task ffff810108051790)
Jun 19 22:08:41 suse104-10205-ee-si kernel: Stack: 0000000100000000 0000000500000009 0000000000000001 ffff81010460e000
Jun 19 22:08:41 suse104-10205-ee-si kernel:        ffff81010b62de48 ffffffff80186d05 ffff81011ed78188 0000000000000000
Jun 19 22:08:41 suse104-10205-ee-si kernel:        ffff81011f187dc0 ffffffff8017c51e
Jun 19 22:08:41 suse104-10205-ee-si kernel: Call Trace: <ffffffff80186d05>{mntput_no_expire+29}
Jun 19 22:08:41 suse104-10205-ee-si kernel:        <ffffffff8017c51e>{link_path_walk+214} <ffffffff8828a111>{:vboxsf:sf_get_volume_info+52}
Jun 19 22:08:41 suse104-10205-ee-si kernel:        <ffffffff8016d074>{vfs_statfs+108} <ffffffff8016d1d5>{vfs_statfs_native+19}
Jun 19 22:08:41 suse104-10205-ee-si kernel:        <ffffffff8016d2a0>{sys_statfs+63} <ffffffff802c9d8f>{thread_return+0}
Jun 19 22:08:41 suse104-10205-ee-si kernel:        <ffffffff8016e7b4>{sys_write+69} <ffffffff8010aba2>{system_call+126}
Jun 19 22:08:41 suse104-10205-ee-si kernel:
Jun 19 22:08:41 suse104-10205-ee-si kernel: Code: 8b 06 48 89 e6 48 89 54 24 24 c7 44 24 20 02 00 00 00 ba 60
Jun 19 22:08:41 suse104-10205-ee-si kernel: RIP <ffffffff8828bb81>{:vboxsf:VbglR0SfFsInfo+45} RSP <ffff81010b62dcc8>
Jun 19 22:08:41 suse104-10205-ee-si kernel: CR2: 0000000000000000
I cannot find vboxsf.ko appearing in the log.

here's the content of /var/mail/root

Code: Select all

X-Original-To: root
Delivered-To: root@suse104-10205-ee-si.site
Received: by suse104-10205-ee-si.site (Postfix, from userid 0)
        id 6D7A857659; Mon, 19 Jun 2017 22:15:01 +0800 (SGT)
Date: Mon, 19 Jun 2017 22:15:01 +0800
To: root@suse104-10205-ee-si.site
Subject: cronjob@suse104-10205-ee-si - hourly - OK
User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20170619141501.6D7A857659@suse104-10205-ee-si.site>
From: root@suse104-10205-ee-si.site (root)

running hourly cronjob scripts

SCRIPT: output (stdout && stderr) follows

Unknown Intel CPU type family 6 model 45
SCRIPT: mcelog
------- END OF OUTPUT

how do I resolve the above? many thanks in advance.

most of the time error is kiled rather than segmentation error.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Segmentation Error After mounting vboxsf

Post by Martin »

He is asking for the actual kernel driver file 'vboxsf.ko' itself from the directory /lib/modules/$(uname -r) in the guest.
Please zip this file and attach it here.
virtualboxnewbie
Posts: 22
Joined: 25. Aug 2012, 08:23

Re: Segmentation Error After mounting vboxsf

Post by virtualboxnewbie »

Hi,

here's the file. please change vboxsf.txt to vboxsf.ko
many thanks in advance
Attachments
vboxsf .txt
please change vboxsf.txt to vboxsf.ko
(55.6 KiB) Downloaded 12 times
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: Segmentation Error After mounting vboxsf

Post by frank »

Thanks. Now I know where it crashes and why but I don't know why this happens :) Is this error reproducible? Which kernel version is installed in your guest? For reference, it crashes here:

Code: Select all

DECLVBGL(int) VbglR0SfFsInfo(PVBGLSFCLIENT pClient, PVBGLSFMAP pMap, SHFLHANDLE hFile,
                             uint32_t flags, uint32_t *pcbBuffer, PSHFLDIRINFO pBuffer)
{
    int rc;
    VBoxSFInformation data;

    VBOX_INIT_CALL(&data.callInfo, INFORMATION, pClient);

    data.root.type                      = VMMDevHGCMParmType_32bit;
    data.root.u.value32                 = pMap->root;
                                          ^^^^^^^^^^^
because pMap is NULL. This function is called from here:

Code: Select all

int sf_get_volume_info(struct super_block *sb, STRUCT_STATFS *stat)
{
    struct sf_glob_info *sf_g;
    SHFLVOLINFO SHFLVolumeInfo;
    uint32_t cbBuffer;
    int rc;

    sf_g = GET_GLOB_INFO(sb);
    cbBuffer = sizeof(SHFLVolumeInfo);
    rc = VbglR0SfFsInfo(&client_handle, &sf_g->map, 0, SHFL_INFO_GET | SHFL_INFO_VOLUME,
                        &cbBuffer, (PSHFLDIRINFO)&SHFLVolumeInfo);
So sf_g->map is NULL for some unknown reason...
virtualboxnewbie
Posts: 22
Joined: 25. Aug 2012, 08:23

Re: Segmentation Error After mounting vboxsf

Post by virtualboxnewbie »

Dear Frank,

this error is reproducible

my kernel version is as follow:

Code: Select all

uname -a
Linux suse104-10205-ee-si 2.6.16.60-0.85.1-default #1 Thu Mar 17 11:45:06 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
is there any thing I could do to make sure that pMap is not NULL?
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: Segmentation Error After mounting vboxsf

Post by frank »

That's a really ancient kernel and I don't have such a system for testing. The problem could be a result of such an old kernel version. You could try the following: Go to /usr/src/vboxguest-VERSION/vboxsf (replace VERSION with the actual version of your Guest Additions) and change the fils utils.c like this:

Code: Select all

--- utils.c     (revision 116353)
+++ utils.c     (working copy)
@@ -843,6 +843,8 @@
 
     sf_g = GET_GLOB_INFO(sb);
     cbBuffer = sizeof(SHFLVolumeInfo);
+    if (!sf_g->map.root)
+        return -EINVAL;
     rc = VbglR0SfFsInfo(&client_handle, &sf_g->map, 0, SHFL_INFO_GET | SHFL_INFO_VOLUME,
                         &cbBuffer, (PSHFLDIRINFO)&SHFLVolumeInfo);
     if (RT_FAILURE(rc))
Then recompile the Guest Additions kernel modules with

Code: Select all

/sbin/rcvboxadd setup
Then reboot the guest and try if you can still trigger the crash.
Post Reply