Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-15-2009, 05:06 PM   #1
Registered: Feb 2009
Posts: 83

Rep: Reputation: 25
mono: Segmentation fault


I wrote a small tool in C#. it's a console-tool and it uses 3 dll's, on my windows-pc it works fine.

i recompiled it with monodevelop on a debian, no problems, and it runs there perfectly, too.

the tool is for a embedded arm-board (sam9-l9260), it has 64MB ram and a 300MB swap-partition. normaly are ~20MB used. if i start my tool without arguments, there showa an error: "invalid argments". no problems, thats right.

and if i start the tool with valid arguments, it works, and the ram is going to be filled. and if the ram is filled, mono shows an error "segmentation fault". but i have 300mB free swap why it didnt use it?

the next problem is, why the tool uses so much ram? it's a small tool, which exports data from a sqlite3-database to a xml. on a pc the tool needs ~1sec for his work. ok, the arm-board is much slower but here i wait 20sec, then it crashes...

have someone an idea? can i run the tool only in the swap? it's no problem if the tool need 1min to run. i only run it all 2-5 days.

best regards
Old 11-15-2009, 07:26 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Unfortunately, .Net is a memory pig. And the Mono implementation of .Net tends to be PQ ("Pig Quebed ).

Suggestion: compare a Mono "hello world" with an equivalent Java "hello world", assuming you have access to a JRE for your device. I think you might be astonished at the difference!

There's always C/C++ !

You should *never* rely on swap, if you can at *all* avoid it. This is equally true of Linux or Windows; of desktops or embedded devices. Once you run out of RAM and start hitting your swapfile ... you're going to start encountering all KINDS of problems - high latency, high CPU utilization, huge performance hits ... and random problems like the odd segmentation fault here or there. Unfortunate, but true.

Last edited by paulsm4; 11-15-2009 at 07:29 PM.
Old 11-16-2009, 03:22 AM   #3
Registered: Feb 2009
Posts: 83

Original Poster
Rep: Reputation: 25

thx for the answer yes, i know that mono needs much ram, but i thought not so much shit happens...

c/c++, the languages are ok, but if i work with xml and databases i normally use c# (under windows) and on linux perl.

so i'll work now with perl. i'm gutted about mono, because 40mb free ram in normally enough to run so a small console-tool.

and ok i'll try to never use my swap


best regards


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation Fault arabindav Programming 2 03-02-2007 08:07 AM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 09:34 AM
segmentation fault samprabhu Linux - General 3 07-29-2005 07:17 PM
segmentation fault r_x Linux - Software 3 04-26-2005 05:22 AM
Segmentation fault Varadharajan Programming 5 04-22-2005 10:26 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration