Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007900opensim[REGION] OpenSim Corepublic2016-05-05 07:512019-02-06 11:30
Reporterzadark 
Assigned To 
PrioritynormalSeveritycrashReproducibilityrandom
StatusclosedResolutionopen 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0007900: Crash due to setting Thread.name after thread start. [PATCH]
DescriptionBehaviour pronounced on Linux kernels above 3.10 or hangs within console input monitoring during MS Windows Visual Studio debug sessions.

MSDN documentation states:
'This property is write-once. Because the default value of a thread's Name property is null, you can determine whether a name has already been explicitly assigned to the thread by comparing it with null.'
It does not explicitly state that the name can be set after the thread has started.

Applies to both Robust and Simulator.
The patch provided does not change functionality, only applies caution as to the unpredictable nature when the name is set after thread start.
Steps To ReproduceOperate OpenSim simulator or robust on Linux kernels above 3.10
Operate OpenSim simulator debug session within MS Windows Visual Studio.
Additional InformationObserving runtime code it appears that thread management memory is allocated during thread class instantiation and is therefore vulnerable to corruption should an excessive name length be set after this time.
TagsNo tags attached.
Git Revision or version numberall current development and releases
Run Mode Grid (1 Region per Sim)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Windows
Mono VersionOther
Viewer
Attached Filespatch file icon 0001-Fix-crash-due-to-setting-Thread.name-after-thread-st.patch [^] (2,123 bytes) 2016-05-05 07:51 [Show Content]

- Relationships
related to 0007895new Region crash with SIGSEGV. 
related to 0007384closedzadark Intermittent Opensim crash on Linux 32 bit platform 

-  Notes
(0030278)
smxy (reporter)
2016-05-07 09:11

Having successfully run the test patch suggested in http://opensimulator.org/mantis/view.php?id=7895 [^] and observed that it eliminated the crashing, I'm now running this formal patch, instead.

I'll run it for a couple of days and then I'll report back.
(0030298)
smxy (reporter)
2016-05-11 14:04

I have not had any crashes while running this patch.
(0030299)
smxy (reporter)
2016-05-11 16:42

Making sure someone notices that Zadark added a patch here ...
(0030301)
Diva (administrator)
2016-05-12 18:00

[17:43] <cia-opensim> opensim: zadarkportal * r97a471cb3570 / (2 files in 2 dirs):
[17:43] <cia-opensim> Fix crash due to setting Thread.name after thread start.
[17:43] <cia-opensim>
[17:43] <cia-opensim> Signed-off-by: Diva Canto <diva@metaverseink.com>

Please report back if this makes things work better.
(0030314)
Scooby Scorfield (reporter)
2016-05-15 01:49

I have tried applying this fix twice, but unfortunately I am still getting the crashes. I'm running CentOS 7 x64 with a 3.10 kernel.
(0030315)
zadark (reporter)
2016-05-15 04:27

@Scooby Scorfield
As stated the patch fixes crashes due to thread naming.
You can verify by observing stacktrace report includes

Native stacktrace:
......

/lib64/libpthread.so.0(pthread_setname_np+ ....
......
Debug info from gdb:
(0030316)
smxy (reporter)
2016-05-15 09:29

I was experiencing crashes of various idle regions, daily, until applying this patch and this is what I'm running it on:

[ste@os00 ~]$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[ste@os00 ~]$ uname -a
Linux os00 3.10.0-327.13.1.el7.x86_64 0000001 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[ste@os00 ~]$

I'm not sure why it isn't working for Scooby, but it certainly is for me.
(0030317)
Scooby Scorfield (reporter)
2016-05-15 10:01

Just to confirm, this is the output I'm seeing:-

 mono() [0x49efd7]
        /lib64/libpthread.so.0(+0xf100) [0x7f853184a100]
        /lib64/libc.so.6(gsignal+0x37) [0x7f85312985f7]
        /lib64/libc.so.6(abort+0x148) [0x7f8531299ce8]
        mono() [0x5d80c9]
        mono() [0x5e623e]
        mono() [0x5dfeda]
        mono() [0x5daf0d]
        mono() [0x5db355]
        mono() [0x5dba21]
        mono() [0x5dec62]
        mono() [0x5def0d]
        mono() [0x5df08b]
        mono(mono_string_new_size+0x4b) [0x57153b]
        [0x4131cf1a]

While it relates to 'libpthread.so.0', I'm not seeing 'pthread_setname_np'

I don't know enough about it to know if this is the same issue?
(0030318)
zadark (reporter)
2016-05-15 15:27

@scooby. Thread naming appears not to be contributing to your issue.

As Opensim makes extensive use of threads stacktrace includes libpthread.so.0

To progress with your issue create a new mantis documenting system configuration history and usage.
(0030331)
kcozens (administrator)
2016-05-17 08:26

commit 97a471cb357029e6f93c00ced5a7e6db79d783be
Author: Roger Kirkman <zadarkportal@gmail.com>
Date: Thu May 5 15:21:15 2016 +0100

    Fix crash due to setting Thread.name after thread start.
    
    Signed-off-by: Diva Canto <diva@metaverseink.com>
(0034538)
BillBlight (developer)
2019-02-06 11:30

Marked as Resolved but never closed, can be reopened if needed.

- Issue History
Date Modified Username Field Change
2016-05-05 07:51 zadark New Issue
2016-05-05 07:51 zadark File Added: 0001-Fix-crash-due-to-setting-Thread.name-after-thread-st.patch
2016-05-07 09:11 smxy Note Added: 0030278
2016-05-11 14:04 smxy Note Added: 0030298
2016-05-11 16:42 smxy Note Added: 0030299
2016-05-11 16:42 smxy Status new => patch included
2016-05-11 16:44 smxy Relationship added related to 0007895
2016-05-12 18:00 Diva Note Added: 0030301
2016-05-15 01:49 Scooby Scorfield Note Added: 0030314
2016-05-15 04:27 zadark Note Added: 0030315
2016-05-15 09:29 smxy Note Added: 0030316
2016-05-15 10:01 Scooby Scorfield Note Added: 0030317
2016-05-15 15:27 zadark Note Added: 0030318
2016-05-17 08:26 kcozens Note Added: 0030331
2016-05-17 08:27 kcozens Status patch included => resolved
2016-05-17 08:27 kcozens Resolution open => fixed
2016-05-17 08:27 kcozens Assigned To => kcozens
2016-05-17 08:27 kcozens Assigned To kcozens =>
2016-05-17 08:29 kcozens Resolution fixed => open
2016-05-17 09:16 zadark Relationship added related to 0007384
2019-02-06 11:30 BillBlight Note Added: 0034538
2019-02-06 11:30 BillBlight Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker