Jump to content
Excelsior Forums
spectdev

SuspendThread failed with error

Recommended Posts

JET version 7.2.

I had reported a similar issue in the past:

As mentioned in that thread, the issue was related to not properly detaching the native thread from the JVM.

This current report, however, is different.

I am making sure to properly detach my native threads from the JVM, but I am getting error with different severity on Windows than on Linux.

On Windows, I get occasional "SuspendThread failed with error 5 (handle xxx, ID xxxx)", but the application does not crash.

On Linux, however, I get "SuspendThread failed with error 3 (handle xxxxxxx, ID xxxxxxxxxx)" and it crashes the application.

Questions:

Is JET the one calling SuspendThread? I ask that as no where in my code SuspendThread is being called.

Can JET provide some type of notification before a thread is suspended and after it is resumed?

Here is an excerpt from an strace on Linux:

378 13:22:18.589362 rt_sigtimedwait([TRAP RT_3 RT_4 RT_5], NULL, NULL, 8 <unfinished ...>

511 13:22:18.589380 <... read resumed> "\x50\x10\x00\x00\x10\x00\x00\x00\x00\xf8\x02\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\xe8\x03\x00\x00"..., 135168) = 4176

406 13:22:18.589400 <... writev resumed> ) = 24

511 13:22:18.589438 pwrite64(20, "\x06\x18\x22\xbb\x90\xc3\xdb\x9b\x37\x40\x81\x62\x1f\x0f\x74\x8f\x5b\x47\x67\x38\x02\x9c\xde\xa7\x5c\x5c\xda\x1c\x6f\x1c\x91\xce"..., 4096, 501809152 <unfinished ...>

406 13:22:18.589529 read(22, <unfinished ...>

511 13:22:18.589585 <... pwrite64 resumed> ) = 4096

343 13:22:18.589598 <... tgkill resumed> ) = 0

511 13:22:18.589611 writev(22, [{"\x18\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x02\x00\x00\x00\x00\x00", 16}, {"\x00\x10\x00\x00\x00\x00\x00\x00", 8}], 2 <unfinished ...>

343 13:22:18.589647 tgkill(340, 381, SIGRT_3 <unfinished ...>

516 13:22:18.589661 <... read resumed> "\x50\x10\x00\x00\x10\x00\x00\x00\x01\xf8\x02\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\xe8\x03\x00\x00"..., 135168) = 4176

511 13:22:18.589681 <... writev resumed> ) = 24

516 13:22:18.589695 pwrite64(20, "\x58\x42\xc6\xad\xb6\x9e\x55\x9a\xe4\x57\x97\x32\x39\x0e\x35\x5a\x5e\xea\x76\x81\x33\xbe\x10\x47\x88\x3b\x08\x8d\x5c\x7a\xb5\x7a"..., 4096, 501813248 <unfinished ...>

511 13:22:18.589730 read(22, <unfinished ...>

516 13:22:18.589784 <... pwrite64 resumed> ) = 4096

381 13:22:18.589796 <... read resumed> 0xc7ce488, 135168) = ? ERESTARTSYS (To be restarted)

516 13:22:18.589810 writev(22, [{"\x18\x00\x00\x00\x00\x00\x00\x00\x01\xf8\x02\x00\x00\x00\x00\x00", 16}, {"\x00\x10\x00\x00\x00\x00\x00\x00", 8}], 2 <unfinished ...>

381 13:22:18.589830 --- SIGRT_3 (Real-time signal 1) @ 0 (0) ---

381 13:22:18.589906 rt_sigtimedwait([TRAP RT_3 RT_4 RT_5], NULL, NULL, 8 <unfinished ...>

516 13:22:18.589939 <... writev resumed> ) = 24

503 13:22:18.589952 <... read resumed> "\x50\x10\x00\x00\x10\x00\x00\x00\x02\xf8\x02\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\xe8\x03\x00\x00"..., 135168) = 4176

516 13:22:18.589974 read(22, <unfinished ...>

503 13:22:18.589987 pwrite64(20, "\xed\x37\x02\x0b\x44\x2f\xb1\x1f\xe6\xeb\x43\x51\xe5\x9c\xde\xca\x72\xd5\x00\x59\x0c\x9f\xfb\x1c\x58\x41\x29\x98\xee\x07\x3b\x43"..., 4096, 501817344 <unfinished ...>

343 13:22:18.590034 <... tgkill resumed> ) = 0

503 13:22:18.590091 <... pwrite64 resumed> ) = 4096

343 13:22:18.590106 write(2, "SuspendThread failed with error "..., 65 <unfinished ...>

503 13:22:18.590125 writev(22, [{"\x18\x00\x00\x00\x00\x00\x00\x00\x02\xf8\x02\x00\x00\x00\x00\x00", 16}, {"\x00\x10\x00\x00\x00\x00\x00\x00", 8}], 2 <unfinished ...>

343 13:22:18.590148 <... write resumed> ) = 65

503 13:22:18.590173 <... writev resumed> ) = 24

498 13:22:18.590185 <... read resumed> "\x50\x10\x00\x00\x10\x00\x00\x00\x03\xf8\x02\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\xe8\x03\x00\x00"..., 135168) = 4176

503 13:22:18.590207 read(22, <unfinished ...>

498 13:22:18.590220 pwrite64(20, "\x03\xe5\x0c\x09\x90\x47\x28\x47\x54\x48\x75\x70\xdf\x2d\x0e\x18\x65\x52\x69\xdc\xbb\x04\x0a\xed\xca\x65\x6b\xc7\xd3\xad\x17\x8a"..., 4096, 501821440 <unfinished ...>

343 13:22:18.590256 write(2, "\n", 1 <unfinished ...>

498 13:22:18.590320 <... pwrite64 resumed> ) = 4096

498 13:22:18.590339 writev(22, [{"\x18\x00\x00\x00\x00\x00\x00\x00\x03\xf8\x02\x00\x00\x00\x00\x00", 16}, {"\x00\x10\x00\x00\x00\x00\x00\x00", 8}], 2 <unfinished ...>

343 13:22:18.590363 <... write resumed> ) = 1

498 13:22:18.590388 <... writev resumed> ) = 24

497 13:22:18.590400 <... read resumed> "\x50\x10\x00\x00\x10\x00\x00\x00\x04\xf8\x02\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\xe8\x03\x00\x00"..., 135168) = 4176

498 13:22:18.590422 read(22, <unfinished ...>

497 13:22:18.590435 pwrite64(20, "\x02\x54\x45\x4d\xbe\xaf\xcd\x56\x14\x4e\x66\xf8\x40\x43\x8e\x52\xc5\x72\x69\x09\xfa\x77\x90\xd9\x35\x03\x47\x33\x9b\x05\x7a\x25"..., 4096, 501825536 <unfinished ...>

343 13:22:18.590470 stat64("jet_err_340.txt", <unfinished ...>

Share this post


Link to post
Share on other sites

JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR #16183 (runtime trap).

Please, contact the vendor of the application.

PID 25468, TID 0xf776cb70

Registers:

EAX = 0x1 EBX = 0xDCD005D8

ECX = 0x8CF3010 EDX = 0x1

ESI = 0x0 EDI = 0xDCD005D8

EBP = 0xF776BFDC ESP = 0xF776BFAC

EIP = 0x8B18F96 (./FlexRAID+0xad0f96)

Stack:

0xF776BFAC: 0x3F37 0x8CF9D2C 0x3 0xDCD00CF8

0xF776BFBC: 0xDCD00CF8 0x8B18F50 0x8B47F28 0xDCD005D8

0xF776BFCC: 0x0 0x904B714 0xE6B84067 0x27

0xF776BFDC: 0x904B714 0x8B1F23E 0x8B18F50 0x0

Version Information:

Java version: 1.6.0_20

Excelsior JET 7.20 Professional edition

Build info: RT: Professional edition, build jet-720-release (Fri Jun 18 02:28:29 NOVST 2010)

JET Profile: 1.6.0_20

Runtime: Desktop

Application was deployed

Options and system properties:

-Djet.jit.cache.dir=jittemp

-Djet.jit.fast=

-Djet.jit.cache=

-Djet.gc.heaplimit=0

Entry point type: exe

Command line: ./FlexRAID

OS:

squeeze/sid

Linux 2.6.38-12-generic #51-Ubuntu SMP Wed Sep 28 14:27:32 UTC 2011 x86_64

glibc 2.13 stable

thread library: NPTL

Share this post


Link to post
Share on other sites

Hello,

We advice you to try to run your application using Excelsior JET 7.6.

If the error persists please contact our support java@excelsior-usa.com for further investigation.

Also we appreciate if you send us a sample so we could reproduce the problem on our side.

-- Vladimir

Share this post


Link to post
Share on other sites

Okay, I have upgraded to JET 7.6 but still getting the same error only with more preceding failures this time..

The errors in the Windows event viewer are in this order:

1. AJ-runtime trap: kind = 1, source = D:\JetCheck\buildsystem-distribs\distribs\jet_pro_en\build\aj-runtime\rt-normal\core\runtime\windows\java\com\excelsior\jet\runtime\os\OSThread.java, line = 166

2. Unexpected OS failure: SuspendThread() failed (error code 5)

3. JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR #44 (runtime trap).

Please, contact the vendor of the application.

Extra information about error is saved in the "jet_err_2212.txt" file.

Share this post


Link to post
Share on other sites

Here is a more recent failure:

error 1

AJ-runtime trap: kind = 1, source = D:\JetCheck\buildsystem-distribs\distribs\jet_pro_en\build\aj-runtime\rt-normal\core\runtime\windows\java\com\excelsior\jet\runtime\os\OSThread.java, line = 166

error 2

Unexpected OS failure: SuspendThread() failed (error code 5)

error 3


JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR #44 (runtime trap).
Please, contact the vendor of the application.
Extra information about error is saved in the "jet_err_11444.txt" file.


Share this post


Link to post
Share on other sites

Okay, I have upgraded to JET 7.6 but still getting the same error only with more preceding failures this time..

The errors in the Windows event viewer are in this order:

1. AJ-runtime trap: kind = 1, source = D:\JetCheck\buildsystem-distribs\distribs\jet_pro_en\build\aj-runtime\rt-normal\core\runtime\windows\java\com\excelsior\jet\runtime\os\OSThread.java, line = 166

2. Unexpected OS failure: SuspendThread() failed (error code 5)

3. JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR #44 (runtime trap).

Please, contact the vendor of the application.

Extra information about error is saved in the "jet_err_2212.txt" file.

Hello,

Thank you for the provided information. Please write to our support java@excelsior-usa.com for further investigation.

Also please send us a sample so we could reproduce the problem on our side.

-- Vladimir

Share this post


Link to post
Share on other sites

Hello,

Thank you for the provided information. Please write to our support java@excelsior-usa.com for further investigation.

Also please send us a sample so we could reproduce the problem on our side.

-- Vladimir

As a follow up to this issue, the problem was indeed in my app and was related to improperly detach the native threads from the VM.

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×