How to fix SIGSEGV which prevents MVC application running in Mono - asp.net-mvc

ASP.NET MVC application is installed in Debian server using Apache and mod_mono.
Trying to start it causes SIGSEGV exception in Mono. Apache error.log contains
[Wed Mar 06 22:07:13 2019] [notice] Apache/2.2.22 (Debian) mod_mono/3.12 configured -- resuming normal operations
Listening on: /tmp/.mod_mono_server4
Root directory: /
Stacktrace:
[Wed Mar 06 22:07:35 2019] [error] (70014)End of file found: read_data failed
[Wed Mar 06 22:07:35 2019] [error] Command stream corrupted, last command was 1
Listening on: /tmp/.mod_mono_server4
Root directory: /
Stacktrace:
Native stacktrace:
/usr/bin/mono() [0x4accca]
/usr/bin/mono() [0x5040fe]
/usr/bin/mono() [0x4275d7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf0a0) [0x7f47845d30a0]
/usr/bin/mono() [0x47aad9]
/usr/bin/mono() [0x50fcb8]
/usr/bin/mono() [0x510253]
/usr/bin/mono() [0x425efc]
/usr/bin/mono() [0x4af809]
/usr/bin/mono() [0x4b0117]
[0x411fe68c]
Debug info from gdb:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
How to fix this so that application can run ?
Same server also contains other application created with older ASP.NET MVC which runs OK.
Mono was installed using Debian package:
mono --version
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 14 12:30:00 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen

Related

Gluon Mobile not compiling on WSL2 Ubuntu 20.04

Ive been trying to create an apk file for my gluon project. On windows and for windows, the prroject runs perfectly but when in Ubuntu, the commands mvn -Pandroid gluonfx:runagent will run the project but the project wont compile and build.
the error I get keep getting is:
[Wed Jan 04 15:32:35 IST 2023][INFO] We will now compile your code for aarch64-linux-android. This may take some time.[Wed Jan 04 15:33:01 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm[Wed Jan 04 15:33:01 IST 2023][SEVERE] Compiling failed.Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/logAnd please check https://docs.gluonhq.com/ for more information.[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 45.283 s[INFO] Finished at: 2023-01-04T15:33:01+05:30[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.15:compile (default-cli) on project mobiletrial1: Compiling failed -> [Help 1]
The log file
[Wed Jan 04 16:48:54 IST 2023][FINE] PB Command for compile: /mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp -H:EnableURLProtocols=http,https --initialize-at-build-time=com.gluonhq.charm.glisten.visual.MaterialDesignIcon -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/reflectionconfig-aarch64-android.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/jniconfig-aarch64-android.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/resourceconfig-aarch64-android.json -H:-SpawnIsolates -Dsvm.targetArch=aarch64 -H:+ForceNoROSectionRelocations --libc=bionic -H:+UseCAPCache -H:CAPCacheDir=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/capcache -H:CompilerBackend=lir -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AARCH64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
[Wed Jan 04 16:48:54 IST 2023][FINE] Start process compile...
[Wed Jan 04 16:48:54 IST 2023][FINE] Result for compile: 0
[Wed Jan 04 16:48:54 IST 2023][FINE] Logging process [compile] to file: /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/log/process-compile-1672831134641.log
[Wed Jan 04 16:48:54 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm
[Wed Jan 04 16:48:54 IST 2023][SEVERE] Compiling failed.
Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
gluonfx log file
Process
=======
compile
Command Line
============
/mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature --features=com.gluonhq.substrate.feature.GluonFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp -H:EnableURLProtocols=http,https -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/reflectionconfig-x86_64-linux.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/jniconfig-x86_64-linux.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/resourceconfig-x86_64-linux.json -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AMD64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
Output
======
Result
======
result: 0
I have tried uninstalling and reinstalling ubuntu and wsl and I have tried the same process on Linux and have got the same error.

Docker install on armv7

I am having trouble with my docker installation.
I rent a arm storage server for my setup.
The kernel is
4.5.2-armada375 #1 SMP Tue Oct 25 11:52:56 CEST 2016 armv7l
But when i try to insall docker-ce and the other packages ive got the following error:
Jul 09 20:54:50 storage-fr systemd[1]: Failed to start Docker Application Container Engine.
Jul 09 20:54:50 storage-fr systemd[1]: docker.service: Unit entered failed state.
Jul 09 20:54:50 storage-fr systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up liberror-perl (0.17024-1) ...
Setting up rename (0.20-4) ...
update-alternatives: using /usr/bin/file-rename to provide /usr/bin/rename (rename) in auto mode
Setting up aufs-dkms (4.9+20161219-1) ...
Loading new aufs-4.9+20161219 DKMS files...
It is likely that 4.5.2-armada375 belongs to a chroot's host
I think the kernel is not compatible.
IS it possible to install docker on it?
I tried this guide https://docs.docker.com/install/linux/docker-ce/debian/
But it doesnt work.
Any idea ?

App error on iOS simulator

I was debugging my application earlier today from Visual Studio Cordova to iOS simulator running on a mac just fine.
After minimal changes, it would no longer run and seemed to crash instantly, giving the following errors in the system log:
Feb 22 14:59:28 Derricks-Air com.apple.CoreSimulator.SimDevice.FD118263-FDD1-4B7F-ADDB-0B5BA5811F88.launchd_sim[1946] (UIKitApplication:com.packagename.mail[0x8540][2832]): Program specified by service does not contain one of the requested architectures: ï
Feb 22 14:59:28 Derricks-Air SpringBoard[1962]: Unable to get pid for 'UIKitApplication:com.packagename.mail[0x8540]': No such process (err 3)
Feb 22 14:59:28 Derricks-Air SpringBoard[1962]: Bootstrapping failed for <FBApplicationProcess: 0x7d890cd0; com.packagename.mail; pid: -1>
Feb 22 14:59:28 Derricks-Air SpringBoard[1962]: Application 'UIKitApplication:com.packagename.mail[0x8540]' exited voluntarily.
I have since reverted any code changes and am still having this issue.
Any ideas?

Error while deploying on cloud using cloud foundry

I have installed cloud foundry plugin on my grails project and I have successfully pushed my project once onto the cloud but when I tried to update my app using,
grails prod cf-update
command. When I did this, I get the following error:
ERROR - Application 'scheduleNew' failed to start, logs information below.
==== logs/stderr.log ====
Jan 23, 2012 2:45:02 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8963
Jan 23, 2012 2:45:02 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 378 ms
Jan 23, 2012 2:45:02 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Jan 23, 2012 2:45:02 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 23, 2012 2:45:02 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Jan 23, 2012 2:45:02 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Jan 23, 2012 2:45:12 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 23, 2012 2:45:12 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager#7e628e42] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.example.SecRole.data] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.hibernate.cache.UpdateTimestampsCache.data] but has failed to stop it. This is very likely to create a memory leak.
Jan 23, 2012 2:45:12 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [org.hibernate.cache.StandardQueryCache.data] but has failed to stop it. This is very likely to create a memory leak.
==== logs/stdout.log ====
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Stopping Tomcat because the context stopped.
When I again run the same command (grails prod cf-update), the error message getting changed :
ERROR - Application 'scheduleNew' failed to start, logs information below.
==== logs/stderr.log ====
Jan 23, 2012 2:52:14 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-45003
Jan 23, 2012 2:52:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 379 ms
Jan 23, 2012 2:52:14 AM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Jan 23, 2012 2:52:14 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 23, 2012 2:52:14 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Jan 23, 2012 2:52:14 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
I really don't understand whats going on here.
What these error messages say? Where I have went wrong?
There are other log files. If you use the http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/ref/Scripts/cf-list-files.html command you can get a directory listing. Run grails cf-list-files / to get a listing of the top-level directory (it'll contain a logs and a tomcat directory). The logs directory will probably just have the stderr and stdout files that you're already seeing, but there's another logs directory under the tomcat directory: grails cf-list-files /tomcat/logs. This should have other more informative log files. Also check if there's a stacktrace.log in the tomcat directory.
Once you've found a file you want to look at, use the http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/ref/Scripts/cf-get-file.html command to view them, e.g.
grails cf-get-file /tomcat/stacktrace.log
grails cf-get-file /tomcat/logs/catalina.2012-01-24.log

Passenger/mod_rails fails to initialize in Fedora 12 when starting Apache

I am in the process of setting up a server to run a Ruby on Rails application on Fedora 12, using Passenger.
I am at the stage where I've installed Passenger, set it up as prescribed, but get the following errors when I restart Apache:
[Wed Jan 13 15:41:38 2010] [notice] caught SIGTERM, shutting down
[Wed Jan 13 15:41:40 2010] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Wed Jan 13 15:41:40 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jan 13 15:41:40 2010] [error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /tmp/passenger.25235/.guard: Permission denied (13)
[Wed Jan 13 15:41:40 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jan 13 15:41:40 2010] [notice] Digest: done
[Wed Jan 13 15:41:40 2010] [error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /tmp/passenger.25235/.guard: Permission denied (13)
[Wed Jan 13 15:41:40 2010] [error] python_init: Python version mismatch, expected '2.6', found '2.6.2'.
[Wed Jan 13 15:41:40 2010] [error] python_init: Python executable found '/usr/bin/python'.
[Wed Jan 13 15:41:40 2010] [error] python_init: Python path being used '/usr/lib/python26.zip:/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'.
[Wed Jan 13 15:41:40 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed Jan 13 15:41:40 2010] [notice] mod_python: using mutex_directory /tmp
[Wed Jan 13 15:41:40 2010] [notice] Apache/2.2.14 (Unix) DAV/2 Phusion_Passenger/2.2.9 PHP/5.3.0 mod_python/3.3.1 Python/2.6.2 mod_ssl/2.2.14 OpenSSL/1.0.0-fips-beta3 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
As you can see, there is a permissions problem when Passenger is trying to initialize:
[Wed Jan 13 15:41:40 2010] [error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /tmp/passenger.25235/.guard: Permission denied (13)
When Apache is starts, it does create a file in /tmp:
d-ws--x--x. 2 root root 4096 2010-01-13 16:04 passenger.26117
If instead I run the app by firing up mongrel directly with mongrel_rails start -e production, I see the following:
ActiveRecord::StatementInvalid (Mysql::Error: Can't create/write to file '/tmp/#sql_5d3_0.MYI' (Errcode: 13): SHOW FIELDS FROM `users`):
Again the error points to permission issues with the /tmp directory.
I am at a loss as to what the solution is. I'm not sure if it is related to simply directory permissions or Fedora's SELinux security.
Any help would be appreciated. Thanks.
I did the same as Fred, except that instead of doing it one error at a time:
Go into permissive mode by running setenforce 0
Restart apache, and hit your site and use it for a while as normal
Run grep httpd /var/log/audit/audit.log | audit2allow -M passenger
semodule -i passenger.pp
Go back to enforcing mode by running setenforce 1
Restart apache and test your site - hopefully it should all be working as before!
Note that this is basically a specific example of the procedure on the Centos SELinux help - check it out.
I'm having the same issue in CentOS 5.4, SELinux getting in the way of Passenger.
Setting PassengerTempDir to /var/run/passenger simply gives you the same permission errors in the new directory instead of /tmp :
[Mon Feb 22 11:42:40 2010] [error] *** Passenger could not be initialized because of this error: Cannot create directory '/var/run/passenger/passenger.3686'
I can then change the security context of /var/run/passenger to get past this error:
chcon -R -h -t httpd_sys_content_t /var/run/passenger/
...and that lets Passenger create the temp directory, but not files within that directory:
[Mon Feb 22 12:07:06 2010] [error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /var/run/passenger/passenger.3686/.guard: Permission denied (13)
Oddly, re-running the recursive chcon again doesn't get past this error, it keeps dying at this point, and this is where my SELinux knowledge gets murky.
The Phusion Passenger guide sections 6.3.5 and 6.3.7 have some useful thoughts, but they don't seem to completely resolve the problem.
You need more than just the httpd_sys_content_t permission. I use the following technique to get things started:
start a tail on the audit log: tail -f /var/log/audit/audit.log
reload apache: apachectl restart
Go to the /tmp/directory: cd /tmp
If just 1 line is added use the command: tail -1 /var/log/audit/audit.log | audit2allow -M httpdfifo
Note that the name 'httpdfifo' is just a name chosen to reflect the kind of error that has been observed.
This will create a file named 'httpdfifo.pp'. To allow apache to create a FIFO from here on after you have to issue the command: semodule -i httpdfifo.pp
Continue to do this until all audit errors have been resolved (It took 4 different kind of permissions on my system running Centos 5.4)
Running setenforce 0 before starting will let you test if it's SELinux. Don't forget to run setenforce 1 afterwards.
I tried what Dan Sketcher and Fred Appleman suggested, i.e. repeat the following:
yum install setroubleshoot
echo > /var/log/audit/audit.log # clear irrelevant errors
cd ~
service httpd restart # try booting passenger -- audit.log now shows the relevant permission errors
tail -f /var/log/httpd/error_log # check that passenger is still failing due to permission errors
sealert -a /var/log/audit/audit.log > selinux-diag.txt # translate the permission errors
# read and check that you are happy with selinux-diag.txt
# and either follow its specific advice, or if it just wants you to grep into audit2allow, then:
cat /var/log/audit/audit.log | audit2allow -M mypol # grant everything just denied
semodule -i mypol.p # commit new permissions
But after doing this 5 or 6 times, I kept coming up against new errors, and some of the same errors came up even after I had tried to permit them with "audit2allow".
In the end I just turned off SELinux, with:
echo 0 >/selinux/enforce

Resources