VirtualBox

Custom Query (16363 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1573 - 1575 of 16363)

Ticket Resolution Summary Owner Reporter
#12389 obsolete Slow memory leak in kernel module Hawk-I
Description

With the 4.2.18 version of the virtualbox kernel modules, there is a slow memory leak in the kernel (approx 128 bytes per minute). Attached is dumps from kmemleak. The leaks appear to be coming from a consistent set of functions. Linux kernel 3.10.17.

#17053 duplicate Linux guest readv system call returns stale (cached) shared folder file data -> duplicate of #819 Heath
Description

I use Windows 7 host and a Linux guest and am using a shared folder to share a source code tree between them. I have been experiencing problems with the Linux VM (kernel 4.x) continuing to read stale file data after a file has been updated by the Windows host.

Interestingly, not all programs read the stale cached data. For example, the cat utility will get the correct data, but my version of the GNU Assembler gas does not. (This has led to great confusion when building my program!).

I have discovered that programs that read files using the read system call return the correct data, but those using the readv system call (such as my version of gas) read stale cached data. I wrote a simple test implementation of the cat utility which uses readv, and it too reads the stale data.

So, this bash command will essentially report that a file differs with itself:

$ diff <(cat /share/testfile.txt) <(cat_using_readv /share/testfile.txt)

I further discovered that telling Linux to drop its file caches (very) temporarily solves the problem.

$ echo 3 > /proc/sys/vm/drop_caches

I have been looking through the shared folder source, and I believe the problem lies within 'src/VBox/Additions/linux/sharedfolders/regops.c' and the use of kernel function generic_file_read_iter as the .read_iter member of the file_operations structure (.read_iter is used when doing a readv system call). This function WILL write to and read from the file cache. However, vbox function sf_reg_read, as used for the generic .read member and read system call, appears to always bypass Linux's FS cache.

556     struct file_operations sf_reg_fops =
557     {
558         .read        = sf_reg_read,
559         .open        = sf_reg_open,
560         .write       = sf_reg_write,
561         .release     = sf_reg_release,
562         .mmap        = sf_reg_mmap,
563     #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
564     # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
565         .splice_read = generic_file_splice_read,
566     # else
567         .sendfile    = generic_file_sendfile,
568     # endif
569     # if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
570         .read_iter   = generic_file_read_iter,  // 
571         .write_iter  = generic_file_write_iter,
572     # else
573         .aio_read    = generic_file_aio_read,
574         .aio_write   = generic_file_aio_write,
575     # endif

Further I believe that a similar long-lived issue is reported as ticket #819, only for the sendfile system call. It seems that all of these generic_file_* functions have the expectation that the host controls all access to the drive. However, this is not the case for the shared folder. One may look at the cifs and nfs network shared folder drivers to see how they manage the FS cache.

For reference, some relevant linux kernel files are:

  • fs/read_write.c
  • mm/filemap.c
  • include/linux/fs.h
#4128 fixed Can't hibernate host while guest is running Roman Pushkov
Description

I'm using Ubuntu 9.04 (8.10 had the same problem) as host and running Windows XP SP3 as guest. When choosing "Hibernate" in host, host goes to "Suspend"-mode, not "Hidernate". When guest OS not started, "Hibernate"-mode works properly.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy