Hi ,
        Here is the dump of one Java Application when it invokes native
        calls through JNI of jdk1.1.6  on Redhat Linux .

        The function RegisterApp is written in C. It creates two
        threads out of which one reads from a character device driver.
        When read is issued on this character device driver it is supposed
        to return some driver related data.

        When RegisterApp is invoked using Java  Application, then
        the following dump occurs. The interface between Java Application
        and C API is JNI ( Java Native Interface ).


Are  there any problems involved when we access the character drivers using 
JNI from a Java Application. 

And it's not a problem of securityManager. There is no securityManager used .
Also the ADPSE_RegisterApp has successfully tested using C Application.



********* Here is the DUMP     ******************



< CONTROL > RegisterApp Entered 
< CONTROL >  In MesgQueueConstruct 
< CONTROL >  MesgQueueConstruct Complete 
< CONTROL > In ConstructResponseSlots 
< CONTROL > ConstructResponseSlots Complete 
< CONTROL >In OpenNdvbsDriver 
< CONTROL > In NdvbsAllocateBoard  
< CONTROL > NdvbsDeviceIoControl 
< CONTROL > Size of the buffer before issuing ioctl : 8 
< CONTROL > Size of the buffer returned from ndvbs driver : 4 
< CONTROL >  READ THREAD  STARTED ... 
< CONTROL > In  NdvbsReadFile 
 < CONTROL > Exit Entered 
< CONTROL > In UnRegisterApp 
< CONTROL > In NdvbsDeallocateBoard 
< CONTROL > NdvbsDeviceIoControl 
< CONTROL > Size of the buffer before issuing ioctl : 4 
< CONTROL > Size of the buffer returned from ndvbs driver : 4 
< CONTROL > In DestructResponseSlots 
SIGSEGV   11*  segmentation violation
        stackbase=0x41358000, stackpointer=0x41357d5c

Full thread dump:
    "Finalizer thread" (TID:0x40655208, sys_thread_t:0x41399e0c, state:CW) prio=1
    "Async Garbage Collector" (TID:0x40655250, sys_thread_t:0x41378e0c, state:CW) 
prio=1
    "Idle thread" (TID:0x40655298, sys_thread_t:0x41357e0c, state:R) prio=0 *current 
thread*
    "Clock" (TID:0x40655088, sys_thread_t:0x41336e0c, state:CW) prio=12
Full thread dump:
    "Finalizer thread" (TID:0x40655208, sys_thread_t:0x41399e0c, state:CW) prio=1
    "Async Garbage Collector" (TID:0x40655250, sys_thread_t:0x41378e0c, state:CW) 
prio=1
    "Idle thread" (TID:0x40655298, sys_thread_t:0x41357e0c, state:R) prio=0 *current 
thread*
    "Clock" (TID:0x40655088, sys_thread_t:0x41336e0c, state:CW) prio=12
    "main" (TID:0x406550b0, sys_thread_t:0x818f110, state:CW) prio=5
Monitor Cache Dump:
    <unknown key> (0x0x413ab148): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aaf40): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aaf74): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab17c): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aad6c): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aad04): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab114): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aaf0c): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aad38): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x41378e0c): <unowned>
        Waiting to be notified:
            "Async Garbage Collector" (0x41378e0c)
    <unknown key> (0x0x413aadd4): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aafdc): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab1e4): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aabbc): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aada0): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aafa8): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab1b0): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab24c): owner "main" (0x818f110, 1 entry)
 <unknown key> (0x0x413ab044): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aae70): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab078): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aac68): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aac10): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab218): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aae08): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab010): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aac34): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aae3c): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aacd0): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aaed8): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab0e0): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab280): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aac9c): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413ab0ac): owner "main" (0x818f110, 1 entry)
    <unknown key> (0x0x413aaea4): owner "main" (0x818f110, 1 entry)
Registered Monitor Dump:
    Thread queue lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: owner "Idle thread" (0x41357e0c, 1 entry)
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
        Waiting to be notified:
            "Finalizer thread" (0x41399e0c)
    Monitor IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>

 I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x41336e0c)
    Monitor registry: owner "Idle thread" (0x41357e0c, 1 entry)
Thread Alarm Q:
    sys_thread_t 0x818f110   [Timeout in 9 ms]
    sys_thread_t 0x41378e0c   [Timeout in 960 ms]
Aborted


        Thanx and Regards
        - Venu Madhav

Reply via email to