Forum Stats

  • 3,734,722 Users
  • 2,247,033 Discussions
  • 7,857,471 Comments

Discussions

Help needed to record an experiment for a running process

Hi Team,

While trying to record an experiment through Profile Running process option, we found issues in generating an experiment file.The error stated that the directory wasn't writable but we made sure all the permissions are available for the folder. The application is a C++ implementation.

Have attached the output message:

Running: /x/opt/SolarisStudio12.4-beta_mar14-linux-x86/lib/analyzer/lib/../../../bin/collect -P 16824 -o test.1.er -d /x/web/STAGE2LP14/xxxx -p on -S on

name test. is in use; changed to test.4.er

Reading xxxx

Reading ld-linux.so.2

name test. is in use; changed to test.4.er

Reading libppfaketime.so.1

Reading librt.so.1

Reading libpthread.so.0

Reading libcrypt.so.1

Reading libz.so.1

Reading libdl.so.2

Reading libkrb5.so.3

Reading libicui18n.so.36

Reading libicuuc.so.36

Reading libicudata.so.36

Reading libicuio.so.36

Reading libexpat.so.0

Reading libqpidmessaging.so.3

Reading libqpidtypes.so.1

Reading libxerces-c.so.27

Reading libstdc++.so.6

Reading libm.so.6

Reading libc.so.6

Reading libgcc_s.so.1

Reading libk5crypto.so.3

Reading libcom_err.so.2

Reading libkrb5support.so.0

Reading libkeyutils.so.1

Reading libresolv.so.2

Reading libqpidclient.so.6

Reading libuuid.so.1

Reading libselinux.so.1

Reading libqpidcommon.so.6

Reading libsepol.so.1

Reading libboost_program_options.so.2

Reading libboost_filesystem.so.2

Reading libsasl2.so.2

Reading ISO8859-1.so

Reading libcollector.so

Attached to process 16824

[email protected] ([email protected]) stopped in __kernel_vsyscall at 0xffffe410

0xffffe410: __kernel_vsyscall+0x0010:    popl     %ebp

Process ID: 12981

dbx: The HW counter configuration could not be loaded

Elapsed Time: 85 ms

Run "collect -h" or "er_kernel -h" with no other arguments for more information on HW counters on this system.

Execution completed, exit status is 0

dbx: Creating experiment database /x/web/STAGE2LP14/xxxxxx/test.4.er (Process ID: 13736) ...dbx: Creating experiment database /x/web/STAGE2LP14/xxxxxx/test.4.er (Process ID: 13736) ...

dbx: Experiment directory not writable

Experiment aborted

error at line 16 of file 'dbxcol3wC1XU'

detaching from process 16824

Even we tried manually using the collect command the process started successfully but while terminating the process using CTRL+ENTER we got coredump error

f7f40000-f7f50000 rwxp f7f40000 00:00 0

f7f50000-f7f6b000 r-xp 00000000 fd:00 589838                             /lib/ld-2.5.so

f7f6b000-f7f6c000 r-xp 0001a000 fd:00 589838                             /lib/ld-2.5.so

f7f6c000-f7f6d000 rwxp 0001b000 fd:00 589838                             /lib/ld-2.5.so

ffbe7000-ffbfc000 rwxp 7ffffffe9000 00:00 0                              [stack]

ffffe000-fffff000 r-xp ffffe000 00:00 0

dbx: internal error: signal SIGABRT (sent by tkill)

dbx's coredump will appear in /tmp

We arent sure how to terminate the collect process manually.

/x/opt/SolarisStudio12.4-beta_mar14-linux-x86/lib/analyzer/lib/../../../bin/collect -P 16824 -o test.1.er -d /x/web/STAGE2LP14/xxxx -p on -S on

Please help us

Thanks

Sattish.

Answers

  • Hi,

    I'm not sure what problem you are hitting. My suggestions for workarounds are:

    a) record the experiment to /tmp (-o /tmp/test.1.er) this is probably good practice anyway since it avoids problems where disk latency creates a probe effect.

    b) Try starting the process under collect then using signals to switch on data collection for the duration of interest.

    https://blogs.oracle.com/d/entry/controlling_profiling

    c) I've not tried -S on with -P <pid> I suspect that it relies on interposing on the synchronisation calls, so would not be effective. So I'd try dropping this combination of options.

    Regards,


    Darryl.

  • 2727557
    2727557 Member Posts: 7

    Hi Darryl,

    Thanks for your response, let me try the option b mentioned in your blog because the first option didn't work.

    Will let you know whether we could gather all the measures which we are interested.

    Thanks

    Sattish

  • 2727557
    2727557 Member Posts: 7

    Hi Darryl,

    We tried with the below mentioned option

    ./collect -P 24829 -o /tmp/test.9.er  But still the same error

    NOTE: No J2SE[tm] was specified for checking.

        The following J2SE[tm] versions are recommended:

          J2SE[tm] 1.7.0_25 or later 1.7.0 updates (preferred)

    NOTE: You can download and install the J2SE[tm] from http://www.oracle.com/technetwork/java/javase/downloads.

    WARNING: Java data collection may fail: J2SE[tm] version is unsupported.

    Reading atlasserv

    Reading ld-linux.so.2

    Reading libppfaketime.so.1

    Reading librt.so.1

    Reading libpthread.so.0

    Reading libcrypt.so.1

    Reading libz.so.1

    Reading libdl.so.2

    Reading libkrb5.so.3

    Reading libicui18n.so.36

    Reading libicuuc.so.36

    Reading libicudata.so.36

    Reading libicuio.so.36

    Reading libexpat.so.0

    Reading libqpidmessaging.so.3

    Reading libqpidtypes.so.1

    Reading libxerces-c.so.27

    Reading libstdc++.so.6

    Reading libm.so.6

    Reading libc.so.6

    Reading libgcc_s.so.1

    Reading libk5crypto.so.3

    Reading libcom_err.so.2

    Reading libkrb5support.so.0

    Reading libkeyutils.so.1

    Reading libresolv.so.2

    Reading libqpidclient.so.6

    Reading libuuid.so.1

    Reading libselinux.so.1

    Reading libqpidcommon.so.6

    Reading libsepol.so.1

    Reading libboost_program_options.so.2

    Reading libboost_filesystem.so.2

    Reading libsasl2.so.2

    Reading ISO8859-1.so

    Reading libcollector.so

    Attached to process 24829

    [email protected] ([email protected]) stopped in __kernel_vsyscall at 0xffffe410

    0xffffe410: __kernel_vsyscall+0x0010:   popl     %ebp

    dbx: The HW counter configuration could not be loaded

    Run "collect -h" or "er_kernel -h" with no other arguments for more information on HW counters on this system.

    dbx: Creating experiment database /tmp/test.9.er (Process ID: 7769) ...

    dbx: Experiment directory not writable

    Experiment aborted

    error at line 15 of file 'dbxcol61PZeE'

    detaching from process 24829

    Could you please review

    Thanks

    Sattish.

  • Did you have any better luck with option (b)? Regards, Darryl.

This discussion has been closed.