Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Problem calling mono app from php script

Posted on 2010-01-13
Medium Priority
Last Modified: 2016-02-19

I am trying to run a mono application from within a php script. It works fine when I run the script using php on the command line. But when I run the script from my browser it does not work.

This is the error:

** (CBSearch.exe:19645): CRITICAL **: _wapi_shm_file_open: shared file [/var/www/.wapi/shared_data-linux-Linux-x86_64-328-11-0] open error: No such file or directory

** (CBSearch.exe:19645): CRITICAL **: _wapi_shm_attach: shared file [/var/www/.wapi/shared_data-linux-Linux-x86_64-328-11-0] open error

** ERROR **: file shared.c: line 346 (shm_semaphores_init): assertion failed: (tmp_shared != NULL)

** (process:19645): WARNING (recursed) **: Thread (nil) may have been prematurely finalized

** (process:19645): WARNING (recursed) **: Thread (nil) may have been prematurely finalized

** (process:19645): WARNING (recursed) **: Thread (nil) may have been prematurely finalized

Native stacktrace:

        mono [0x529817]
        /lib64/libpthread.so.0 [0x3d1860e7c0]
        /lib64/libc.so.6(gsignal+0x35) [0x3d17e30265]
        /lib64/libc.so.6(abort+0x110) [0x3d17e31d10]
        /lib64/libglib-2.0.so.0(g_log+0) [0x3bfe434eb0]
        /lib64/libglib-2.0.so.0(g_log+0x83) [0x3bfe434f33]
        /lib64/libglib-2.0.so.0(g_assert_warning+0x76) [0x3bfe434fb6]
        mono [0x4c5fdc]
        mono [0x4cab9c]
        mono(mono_once+0x44) [0x4c6634]
        mono [0x4cad34]
        mono [0x4cf3d8]
        mono [0x4bd5a7]
        mono(mono_runtime_init+0x25) [0x46ace5]
        mono [0x4f1745]
        mono(mono_main+0x341) [0x414811]
        /lib64/libc.so.6(__libc_start_main+0xf4) [0x3d17e1d994]
        mono(realloc+0x371) [0x413f29]

Debug info from gdb:

(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0x2ade6b710d10 (LWP 19645)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x0000003d17ecce83 in __select_nocancel () from /lib64/libc.so.6
* 1 Thread 0x2ade6b710d10 (LWP 19645)  0x0000003d17ecce83 in __select_nocancel
    () from /lib64/libc.so.6

Thread 1 (Thread 0x2ade6b710d10 (LWP 19645)):
#0  0x0000003d17ecce83 in __select_nocancel () from /lib64/libc.so.6
#1  0x0000003bfe455efc in g_spawn_sync () from /lib64/libglib-2.0.so.0
#2  0x0000003bfe4562b8 in g_spawn_command_line_sync ()
   from /lib64/libglib-2.0.so.0
#3  0x00000000005298b8 in ?? ()
#4  <signal handler called>
#5  0x0000003d17e30265 in raise () from /lib64/libc.so.6
#6  0x0000003d17e31d10 in abort () from /lib64/libc.so.6
#7  0x0000003bfe434eb0 in g_logv () from /lib64/libglib-2.0.so.0
#8  0x0000003bfe434f33 in g_log () from /lib64/libglib-2.0.so.0
#9  0x0000003bfe434fb6 in g_assert_warning () from /lib64/libglib-2.0.so.0
#10 0x00000000004c5fdc in ?? ()
#11 0x00000000004cab9c in ?? ()
#12 0x00000000004c6634 in mono_once ()
#13 0x00000000004cad34 in ?? ()
#14 0x00000000004cf3d8 in ?? ()
#15 0x00000000004bd5a7 in ?? ()
#16 0x000000000046ace5 in mono_runtime_init ()
#17 0x00000000004f1745 in ?? ()
#18 0x0000000000414811 in mono_main ()
#19 0x0000003d17e1d994 in __libc_start_main () from /lib64/libc.so.6
#20 0x0000000000413f29 in g_str_equal ()
#21 0x00007fff303bb558 in ?? ()
#22 0x0000000000000000 in ?? ()

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Question by:zattz
1 Comment

Accepted Solution

zattz earned 0 total points
ID: 26302212
Found solution:

A really lame fix is to create /var/www/.wapi, chown it to
www-data:www-data, and chmod it 770 to hide it from the world.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question