Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2441 Discussions

tbbmalloc_proxy.dll causing "unknown prologue" error on Windows 11/ARM64 in emulation mode

AndrewC
New Contributor III
722 Views

This is from  onetbb 2021.3.0  when running a x64 application in emulation on Windows11/ARM


"TBBmalloc: skip allocation functions replacement in ucrtbase.dll: unknown prologue for function free"

 

Edge case - but Windows 11/ARM x64 emulation is surprisingly fast and usable.

 

No problems on Windows 11/x64

0 Kudos
15 Replies
SeshaP_Intel
Moderator
699 Views

Hi,


Thank you for posting in Intel Communities.


You can use the TBB_malloc_replacement_log function to check if the replacement has succeeded and to get additional information. Please refer to the below link for more details.

https://www.intel.com/content/www/us/en/develop/documentation/onetbb-documentation/top/onetbb-develo...


Could you please try with the oneTBB latest version 2021.7 and let us know the result?

If it does not resolve your issue. Could you please provide the following details you were using so that we can reproduce the issue on our end?

1. Application you are using.

2. Edge case you have used.

3. Complete steps you have followed.


Thanks and Regards,

Pendyala Sesha Srinivas


AndrewC
New Contributor III
684 Views

Thanks for your reply.

Perhaps I was not clear, the application prints the above error message, then exits immediately. The software cannot run. The same software built WITHOUT using the "proxy" runs fine.

 

- The application is an application we build on Windows x64  for Windows 10/11 (x64)

- The case is when a user installs this application on Windows 11/ARM64 and runs our x64 application in emulation mode. Emulation mode on x64 is completely usable for many applications and we would expect that until a ARM64 version of our software is ready, emulation is a viable option for many users and applications as per the experience of many with MacOS on Apple M1.

- The step to reproduce is to simply trying to launch our .exe.

 

I will investigate using TBB 2021.7

AndrewC
New Contributor III
678 Views

I have tried TBB 2021.7.1 and the behavior is identical - the software immediately exits after printing that message. Why the software exits is not due to any coding on our part. The identical software without the proxy runs fine.

AndrewC
New Contributor III
661 Views

Of course the obvious thing to try is to set TBB_MALLOC_DISABLE_REPLACEMENT=1 which should cause TBB to skip replacing malloc/free. This does cause the software to no longer print the error message "TBBmalloc: skip allocation functions replacement in ucrtbase.dll: unknown prologue for function free"

The software was exiting for another reason.

SeshaP_Intel
Moderator
619 Views

Hi,

 

Could you please share the application and steps to reproduce so that we can investigate the issue more from our end?

If you have any issues to share the application publicly, you have a choice to send your source code by private message. So if you are willing to send it, please do let us know, so that we can contact you privately.

 

Thanks and Regards,

Pendyala Sesha Srinivas

SeshaP_Intel
Moderator
590 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks and Regards,

Pendyala Sesha Srinivas


AndrewC
New Contributor III
577 Views

a 'hello world' program will demonstrate the issue

- build on x64 using tbbmalloc_proxy

- run on Windows 11/ARM

SeshaP_Intel
Moderator
503 Views

Hi,


We did not face any issues while running Hello world program on Windows 11.

Could you please share your application and steps to reproduce so that we can investigate the issue more from our end?


Thanks and Regards,

Pendyala Sesha Srinivas


AndrewC
New Contributor III
490 Views

I think you misunderstand

  • Build hello world on Windows x64 - the result is a x86_64 executable
  • Run the executable on Windows 11/ARM64
  • Windows 11/ARM64 has a very robust emulator for x86_64 code, but not surprisingly the runtime environment is different enough so that the proxy malloc do not works as expected.

    The "error" is
    TBBmalloc: skip allocation functions replacement in ucrtbase.dll: unknown prologue for function free
    Hello World!
  • #include "tbb/tbbmalloc_proxy.h"
    #include <iostream>
    
    int main()
    {
        std::cout << "Hello World!\n";
        int *a=(int *)malloc(sizeof(int));
        free(a);
    ;}
SeshaP_Intel
Moderator
439 Views

Hi,


We are working on your issue internally. We will get back to you soon.


Thanks and Regards,

Pendyala Sesha Srinivas


SeshaP_Intel
Moderator
383 Views


Hi,


As per the OneTBB system requirements, the ARM processor is not supported. Please find the below link for more details.

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-threadin...

We can only offer direct support for Intel hardware platforms that the Intel® oneAPI product supports.


Thanks and Regards,

Pendyala Sesha Srinivas


AndrewC
New Contributor III
93 Views

This is a "non-answer".  Part of the Windows 11/ARM64 strategy for Microsoft is to provide a robust runtime environment for running legacy x86 and x64 applications. It works very well with many applications including , even , Visual Studio for example. Applications that use TBB/MKL and other intel libraries work fine, in general. However, it is worth noting that the tbb_malloc proxy does not work in this environment as the patching of the malloc/free does not work with the emulation runtime.

Alexey-Kukanov
Employee
73 Views

Hello Andrew,

Thank you for reporting the issue. Do I understand it right that the only problem you observe now is the malloc replacement diagnostics message, otherwise - for example, if you disable the replacement by TBB_MALLOC_DISABLE_REPLACEMENT=1 - the application runs well with oneTBB?

Given the technique used for redirection of the memory routines to tbbmalloc (run-time binary patching) and additional complications of the emulation environment, perhaps the safest way for now is exactly to disable this functionality when the software runs in the emulator. We will investigate if/how this can be done on our side, while the environment variable can be used as the workaround to get rid of the message if it is annoying.

Also, to decide if in the long run it makes sense to try making tbbmalloc_proxy work in the emulation mode, it would be good to know if it might be of value for customers, i.e. brings some performance benefits comparing to the regular memory allocator. If you have any information in that regard which you can share, that would probably help; we could of course do measurements on some benchmarks, but practical results from a real application are much more valuable.

 

SeshaP_Intel
Moderator
50 Views

Hi,


Has the information provided above helped? If yes, could you please confirm whether we can close this thread from our end?


Thanks and Regards,

Pendyala Sesha Srinivas


SeshaP_Intel
Moderator
28 Views

Hi,


We have provided your feedback to the concerned team. I am closing this thread for now. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks and Regards,

Pendyala Sesha Srinivas


Reply