Menu

After updating to 0.9.0, new error

Leuqarte
2015-09-03
2023-09-13
  • Leuqarte

    Leuqarte - 2015-09-03

    When booting into 0.9.0, received this message on the screen:

    ASSERT /usr/local/UDK2014/MyWorkSpace/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c(56): (Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)DestinationBuffer)
    ASSERT /usr/local/UDK2014/MyWorkSpace/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c(57): (Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)SourceBuffer)

    Any advice? I had a working 0.8.3 (I think) installation from a while back and unfortunately wiped that out.

     
  • Roderick W. Smith

    I received another report of this error yesterday. If you're willing to engage in some back-and-forth trials to figure out where this is coming from, please try the following version:

    http://www.rodsbooks.com/refind-bin-0.9.0.6.zip

    That version includes debugging code that reports what the program is doing. It will probably still crash, but if you take a digital photo and send it to me I'll at least have a better idea of where it's crashing. We can then repeat the process until the cause is found. Please send reports to my e-mail address (rodsmith@rodsbooks.com).

    Before you start, though, if you've installed any but the bare minimum number of drivers required, please uninstall all the drivers except what you need (typically just one to read Linux kernels). Having too many drivers tends to create problems. Some drivers (like the NTFS driver) are particularly trouble-prone.

     
  • Christo

    Christo - 2015-09-07

    I have exactly the same issue. Got this message before booting. I'll try to boot from a live cd and uninstall it but not sure that i will be able to boot it.

     

    Last edit: Christo 2015-09-07
  • Leuqarte

    Leuqarte - 2015-09-09

    I haven't tried the new build you provided, but I can say that 0.9.0 started working upon removing the NTFS driver

     
  • Roderick W. Smith

    Thanks for the report. I've tried reproducing the problems with the NTFS driver myself, but with no luck. I'm thinking of modifying the installation scripts so that it's omitted from the --alldrivers option to install.sh.

     
  • Roderick W. Smith

    I've just released version 0.9.1, which adds a couple of checks to CopyMem() calls in the filesystem drivers. It's possible, but far from certain, that this will fix the problem with the NTFS driver. If you could check that and report back, I'd appreciate it. Thanks!

     
  • Marcin Wisnicki

    Marcin Wisnicki - 2015-10-24

    I have the same problem with 0.9.2

     
  • Marcin Wisnicki

    Marcin Wisnicki - 2015-10-24

    Disabling ntfs does not help, what does help however is downgrading to 0.8.7

     
  • Roderick W. Smith

    Are you seeing EXACTLY the same error message reported by Leuqarte in the first post? If not, please post the exact message. (Posting a digital photo of the hung display is fine.)

    If you're seeing the exact display posted earlier, could you please try each version between the working 0.8.7 and the non-functional 0.9.2 to identify in which version the problem appeared?

    Also, if you're using filesystem drivers you don't need, please remove them. Those drivers sometimes interact in strange ways, so installing more than you need is definitely not recommended. (I always cringe whenever I see directions on a site to install all of the drivers as a matter of course!)

     
  • Marcin Wisnicki

    Marcin Wisnicki - 2015-10-25

    Yes the messages were exactly the same. I will try to narrow the version/drivers causing the problem later this week.

     
  • Fabio Falci

    Fabio Falci - 2016-03-29

    I've got the same error on a Dell laptop, dual booting Windows and Linux.
    Using 0.10.2.

    Actually I updated after some time to 0.10.2, don't remember which version I was using before.
    It worked for one week or two.
    Then I started to get this error and after experimenting with Legacy/EFI boot I was able to boot on Windows using only the Legacy mode but using an akward flow. First I had to wait for the legacy boot fo fail, then it would show an options where I could see 'Windows Boot Manager' and 'Refind Boot Manager'. Chosing either one would show refind screen where I could pick Windows or Linux.

    However today it stopped to work and it's showing the same error of CopyMemWrapper.c.
    Both 'Windows Boot Manager' and 'Refind Boot Manager' are throwing the same error.

    Will try to boot on an usb to inspect my partitions now.

     

    Last edit: Fabio Falci 2016-03-29
  • Fabio Falci

    Fabio Falci - 2016-03-29

    Booting up in a linux live usb I was able to check the refind folder.
    I removed all uncessary drivers for others architectures. Also I removed NTFS and then it started to work again.
    However I lost my linux option, maybe I removed a necessary one.

    Anyway, this laptop is used mostly by my son to play games on windows. At some point I can investigate again.

     
  • Roderick W. Smith

    I'm preparing to release a new rEFInd version that includes a bug fix to the NTFS driver that may help prevent it from hanging. Look for it this evening (US Eastern Time) or tomorrow.

     
  • Heinrich

    Heinrich - 2016-09-07

    I also encountered this exact problem with the latest version 0.10.3
    Deleting ntfs_x64.efi fixed it and allowed normal booting in both Windows 10 and Archlinux.

     
    • Florian P

      Florian P - 2016-09-20

      Thank you! This actually helped. I am at the end of a 3 day journey because a bug in grub destroid my bootloader. After trying endless things i tried rEFind...but then the described error occured. Thanks Heinrich, now i can finally sleep... :)

       
  • Ladislav Jech

    Ladislav Jech - 2016-11-05

    On Windows I today converted my MBR to GPT (without loosing data) to support multiple primary partitions and installed into new EFI partition refind-bin-0.10.4 and facing same issue.

     
  • Kristian Werner

    Kristian Werner - 2017-04-10

    Thank you!
    Had the same issue after upgrading to 0.10.5. Deleting ntfs_x64.efi fixed it and now booting Windows 10, Mint, Zorin, Netrunner and Elementary. (Not PCBSD, but that's a different issue.)

     
  • joevt

    joevt - 2021-12-11

    I had installed the ntfs driver from my RefindPlus fork https://github.com/joevt/RefindPlus (a fork of rEFInd) to a Mac mini 2018. I had some NTFS partitions connected. It crashed during boot but the Mac mini 2018 saves a UEFI panic log with info about loaded UEFI images, registers, and stack trace. At the top of the stack was the NTFS driver image. I used the offsets in the stack trace to find where the problem happened.

    dwarfdump --lookup 0x416D "${DEBUG_BUILD_FOLDER}"/../../filesystems/ntfs/DEBUG/ntfs.dll.dSYM
    

    which leads to /filesystems/fsw_ntfs.c:419:33 which is in function read_attribute_direct just before the call to fsw_memcpy

    It appears that read_attribute_direct can write outside the allocated buffer if olen becomes negative. fsw_memcpy requires an unsigned size - a negative value appears as a large number so memory is overwritten until an unmapped memory address is reached which gives a Page Fault exception which causes the UEFI panic.

    This is probably the cause of the CopyMemWrapper.c ASSERT messages (since fsw_memcpy calls CopyMem).

    I committed some changes at https://github.com/joevt/RefindPlus/commit/92b7bd819d5918692ac3bddedb5f2d69d07cd21a

    I haven't tested if read_attribute_direct is otherwise correct but at least now it stops when olen is negative so I can boot into RefindPlus.

    I've attached the panic text. Is this a feature of the Mac's UEFI firmware? Is the panic performed by the T2 chip's firmware (bridgeOS)?

    I've also attached a release version of the driver (compiled on my Mac).

     
  • Ajaharikram Diggewadi

    I am having same issue on my mini pc, can someone help me on how to resolve this issue?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.