View previous topic :: View next topic |
Author |
Message |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Mon May 09, 2011 5:10 am Post subject: |
|
The attached rsize4.txt is from a run done after removing the apptrap preference pane and restarting the computer. NeoOffice was running - and crashed.
Despite having a fairly slow CPU Macbook Air's perceived speed is pretty high. Might it be that this is achieved by parceling out extra virtual memory for each application from the SSD? |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon May 09, 2011 5:39 am Post subject: |
|
zircon wrote: | The attached rsize4.txt is from a run done after removing the apptrap preference pane and restarting the computer. NeoOffice was running - and crashed.
Despite having a fairly slow CPU Macbook Air's perceived speed is pretty high. Might it be that this is achieved by parceling out extra virtual memory for each application from the SSD? |
OK. So now we know that AppTrap is not the cause. SSD is not the issue. Instead, lack of shared memory is what is causing Apple's Java memory allocation requests to fail. I had hoped that high virtual memory usage meant that the same application was using a lot of shared memory, but that appears to not be the case.
Unlike virtual memory, the Mac OS X default configuration makes shared memory a very limited resource. Specifically, the Mac OS X default is for only 4 MB (that, is 1% of your physical memory) to be used as shared memory.
So, instead of trying to find which application is using that limited amount of shared memory, can you try increasing those limits? To increase the limits, can you execute the following Terminal commands? Note that the "sudo" command will prompt you for your Mac OS X user password to verify that you administrator privileges:
Code: | sudo sysctl -w kern.sysv.shmmax=104857600
sudo sysctl -w kern.sysv.shmall=25600 |
Does NeoOffice still crash after changing the above settings? Note that the above commands will be lost on reboot so try running NeoOffice immediately after executing the commands. If the new settings work, then I will give you steps to preserve the settings when rebooting.
Patrick |
|
Back to top |
|
 |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Mon May 09, 2011 7:20 am Post subject: |
|
OK. So - just to confirm I did it right:
Last login: Mon May 9 20:54:07 on ttys000
teijo-2:~ teijo$ sudo sysctl -w kern.sysv.shmmax=104857600
Password:
kern.sysv.shmmax: 4194304 -> 104857600
teijo-2:~ teijo$ sudo sysctl -w kern.sysv.shmall=25600
kern.sysv.shmall: 1024 -> 25600
teijo-2:~ teijo$
I then started NeoOffice by opening the test document.
Trying to set the cell format crashed the program. The log is attached. |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon May 09, 2011 9:19 am Post subject: |
|
zircon wrote: | I then started NeoOffice by opening the test document.
Trying to set the cell format crashed the program. The log is attached. |
The crash is still the result of no available shared memory. Fortunately, there are 2 other shared memory settings that we can try changing but to do so, you will need to do a few more steps:
1. Same the attached sysctl.conf file to your Desktop
2. Move the sysctl.conf file to /etc folder using the following Terminal commands:
Code: | mv ~/Desktop/sysctl.conf /etc/sysctl.conf
ls -l /etc/sysctl.conf |
3. Reboot
4. After you reboot, invoke the following Terminal command so that I can verify that the new settings are actually being set:
Code: | sysctl -a | grep shm |
Does NeoOffice still crash?
Patrick |
|
Back to top |
|
 |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Mon May 09, 2011 9:59 am Post subject: |
|
Here we go:
teijo-2:~ teijo$ mv ~/Desktop/sysctl.conf /etc/sysctl.conf
mv: rename /Users/teijo/Desktop/sysctl.conf to /etc/sysctl.conf: Permission denied
teijo-2:~ teijo$ sudo mv ~/Desktop/sysctl.conf /etc/sysctl.conf
Password:
teijo-2:~ teijo$ ls -l /etc/sysctl.conf
-rw-r--r--@ 1 teijo staff 109 5 10 01:35 /etc/sysctl.conf
teijo-2:~ teijo$
--- reboot ---
Last login: Tue May 10 01:40:56 on console
teijo-2:~ teijo$ sysctl -a | grep shm
kern.sysv.shmmax: 104857600
kern.sysv.shmmin: 1
kern.sysv.shmmni: 800
kern.sysv.shmseg: 8
kern.sysv.shmall: 25600
machdep.pmap.hashmax: 13
security.mac.posixshm_enforce: 1
security.mac.sysvshm_enforce: 1
teijo-2:~ teijo$
--- Open test.ods and try to set cell format as before ---
This time we get the whirly wheel and a white frame. I've attached a sample log from activity monitor. The log created after force quit as well.
--- force quit NeoOffice and try again ---
The first retry resulted in another whirly wheel. The second and third resulted in crashes. I've attached the crash log from the third retry. |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon May 09, 2011 10:11 am Post subject: |
|
Well, the bad news is that we now know that shared memory limitations are not causing the crashing as your crash log and samples show the crashing and hanging occurring in the exact same place as before even though you raised the shared memory limits.
You can delete the /etc/sysctl.conf file using the following command and then reboot. I will then try to come up with another set of tests to find where and why memory allocations are failing in NeoOffice:
Code: | sudo rm /etc/sysctl.conf |
Patrick |
|
Back to top |
|
 |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Mon May 09, 2011 10:31 am Post subject: |
|
OK - thanks. It must be frustrating to try to do this by remote control.
Let me know when you want me to do something. For now:
--- remove sysctl.conf ---
sudo rm /etc/sysctl.confteijo-2:~ teijo$ sudo rm /etc/sysctl.conf
Password:
teijo-2:~ teijo$ |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon May 09, 2011 10:43 am Post subject: |
|
zircon wrote: | OK - thanks. It must be frustrating to try to do this by remote control. |
Thank you for being patient with the troubleshooting process. Rare bugs like this are difficult to find and fix, but when we eventually find the cause of bugs like this (and I am confident that we will), it definitely will help make NeoOffice more stable for everyone.
In the next 14 or so hours, I am going to try to give you a test patch that will log lots of data about the size of the memory allocation in code just before where the crash occurs. Hopefully, that will point me in a more fruitful direction.
Patrick |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Tue May 10, 2011 2:16 am Post subject: |
|
Before I create a test patch, can you tell me if you have more than one monitor attached to your machine? If so, can you detach all but one monitor and then launch NeoOffice?
Does NeoOffice stop crashing with only one monitor? If so, can you reconnect all of your monitors to your machine and then select the Apple :: About This Mac menu and in the dialog that appears press the "More Info" button? In the window that appears, select the File :: Print menu, select PDF :: Save as PDF in the print dialog that appears, and then attach the PDF file.
Also, can you execute the following Terminal command? This will tell me if you have any custom Java extensions installed that may be interfering with Java's normal operation:
Code: | ls -l /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext |
Patrick |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Tue May 10, 2011 7:47 am Post subject: |
|
In addition to the questions in my last post, can you install the following test patch?:
Intel:
http://joe.neooffice.org/test/NeoOffice-3.2-Patch-2-Debug-1-Intel.dmg
After you install the test patch, launch NeoOffice from a Terminal window using the following command so that all of the log messages that I added in this test patch will output to the Terminal. My hope is that that last few messages just before NeoOffice crashes will give me some clues as to where to focus more investigation:
Code: | /Applications/NeoOffice.app/Contents/MacOS/soffice.bin |
Patrick |
|
Back to top |
|
 |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Wed May 11, 2011 9:36 pm Post subject: |
|
Sorry for the delay.
I've not attached an outside monitor to this MacBook Air.
I've attached the files below. |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Thu May 12, 2011 3:34 am Post subject: |
|
In your latest crash log, the crash is now in Apple's font loading code. This might mean that the crash is due to a bad font on your machine. So, can you clear your machine's font caches by executing the following Terminal commands and then rebooting?:
Code: | atsutil databases -removeUser ; sudo atsutil databases -remove ; atsutil server -shutdown ; atsutil server -ping |
If the crashing still occurs, can you launch the /Applications/Font Book application, click on any font in the Font Book application's Font column, select all of the fonts in that column by selecting the Edit :: Select All menu, and then select the File :: Validate Fonts menu? Do any fonts have a problem? If so, can you select each of those fonts in the Font column and disable the font by selecting the Edit :: Disable Fonts menu?
Does disabling the problem fonts stop the crashing?
Patrick |
|
Back to top |
|
 |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Fri May 13, 2011 2:28 am Post subject: |
|
I ran the command and rebooted - no change.
Font book > validate all fonts
- deleted all fonts that showed errors and all the duplicate fonts.
Reboot
Run font book again
- three duplicates. Delete
Reboot
Run font book again. No errors/duplicates
Quit font book
Start Neo Office from terminal.
- crashed. Files attached. |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Fri May 13, 2011 3:00 am Post subject: |
|
You logs still indicate that you are running out of shared memory so I have written a simple Terminal command application to measure how much shared memory a 32 bit process can allocate.
Can you download the attache executable, save it to your Desktop as a file called "mmap", and execute the following Terminal commands?:
Code: | chmod 755 ~/Desktop/mmap ; ~/Desktop/mmap |
What this command will do is try to allocate share memory in 1 GB chunks until an allocation fails. On my machine, the output looks like the following which indicates that my machine can allocate at least 2 GB of shared memory:
Quote: | Success: 0x200000
Success: 0x40200000
Error 1: 12 2 |
Edit by pluby: attached mmap.c source code file so that I don't lose this useful test code
Patrick |
|
Back to top |
|
 |
zircon Pure-blooded Human

Joined: Aug 14, 2009 Posts: 33 Location: Japan
|
Posted: Mon May 16, 2011 7:50 am Post subject: |
|
Oops, sorry. It looks like I forgot to post the result. Here it is:
Last login: Sat May 14 01:39:00 on console
teijo-2:~ teijo$ chmod 755 ~/Desktop/mmap ; ~/Desktop/mmap
Success: 0x200000
Success: 0x40200000
Error 1: 12 2
teijo-2:~ teijo$ |
|
Back to top |
|
 |
|