All of lore.kernel.org
 help / color / mirror / Atom feed
* [tpm2] Re: abrmd crashing - how to debug?
@ 2021-03-09 19:50 Tadeusz Struk
  0 siblings, 0 replies; 6+ messages in thread
From: Tadeusz Struk @ 2021-03-09 19:50 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

Hi Ken,
On 3/5/21 2:29 PM, Kenneth Goldman wrote:
> Ubuntu focal with WSL, abrmd compiled from source
> 
> After about 5 minutes of sending commands, abrmd crashes. I originally found it with keylime, but I can reproduce it with a simple bash loop on pcrread.
> 
> abrmd exits, the tool output is:
> 
> ** (process:21067): CRITICAL **: 17:25:10.862: failed to allocate dbus proxy object: Could not connect: Connection refused
> WARNING:tcti:src/tss2-tcti/tctildr.c:79:tcti_from_init() TCTI init for function 0x7ff5f6dbbe10 failed with a0008
> WARNING:tcti:src/tss2-tcti/tctildr.c:109:tcti_from_info() Could not initialize TCTI named: tcti-abrmd
> ERROR:tcti:src/tss2-tcti/tctildr-dl.c:154:tcti_from_file() Could not initialize TCTI file: tabrmd
> ERROR:tcti:src/tss2-tcti/tctildr.c:416:Tss2_TctiLdr_Initialize_Ex() Failed to instantiate TCTI
> ERROR: Could not load tcti, got: "tabrmd:bus_name=com.intel.tss2.Tabrmd"
> 
> How would I debug?
> 
> I would expect that nothing that a single application does should crash abrmd.

I think it's not the abrmd that's failing, but the application that is trying to
use tcti-abrmd to communicate with abrmd running in the background.
It can not get the dbus handler so it just prints an error and fails.
Can you look for some system dbus logs to see if there are any errors there?

Thanks,
Tadeusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tpm2] Re: abrmd crashing - how to debug?
@ 2022-04-15 11:58 ericc6727
  0 siblings, 0 replies; 6+ messages in thread
From: ericc6727 @ 2022-04-15 11:58 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

Everyone's life is influenced by their education. I also make an effort to read extensively about 3D printing technologies. However, due to the university's heavy workload, this is not always possible. As a result, I turned to a cheap essay writing https://www.bestessay.com/cheap-essays/ and sought advice from specialists who assist students in completing tasks. In cases of force majeure, these services are quite beneficial. This allows me to devote more attention to other sciences and subjects.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tpm2] Re: abrmd crashing - how to debug?
@ 2022-04-13 10:35 jasonadamses
  0 siblings, 0 replies; 6+ messages in thread
From: jasonadamses @ 2022-04-13 10:35 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

I also think if your target audience belongs to the developed world, you should choose Android. Personally, I chose Android a long time ago, and now it is happy when I find the right software for it. So I want to share best antivirus apps. You can download them here: https://celltrackingapps.com/best-antivirus-for-android/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tpm2] Re: abrmd crashing - how to debug?
@ 2021-03-11 17:05 Kenneth Goldman
  0 siblings, 0 replies; 6+ messages in thread
From: Kenneth Goldman @ 2021-03-11 17:05 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 5285 bytes --]

> From: "Roberts, William C" <william.c.roberts(a)intel.com>
>
> Since you're just running it as a process from a shell and not a
> system service, all the logs will be to stderr/stdout.
> Can you enable env variable G_MESSAGES_DEBUG=all when you run tpm2-
> abrmd and send us the output?


With that set, it runs about 5x longer, 554 loops.  I also noticed that it
fails
less often if I put a sleep between commands.  I'd like to run
a command that takes a long time to respond, like create, but
I don't know how.

Here is the end of the trace:

** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: flushsave_context for 0 entries
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: response_sink_process_response:
writing 0x3e bytes
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: tpm2_command_finalize
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297:     80 01 00 00 00 3e 00 00 00
00 00 00 00 14 00 00
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: message_queue_dequeue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297:     00 01 00 0b 03 01 00 00 00
00 00 01 00 20 00 00
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297:     00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297:     00 00 00 00 00 00 00 00 00
00 00 00 00 00
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: write_all: writing 62 bytes to
ostream
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: write_all: wrote 62 bytes to
ostream
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: returning 62
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: tpm2_response_finalize
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: response_sink_thread: blocking
on input queue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.297: message_queue_dequeue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: command_source_on_input_ready
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: read_data: reading 10 bytes
from istream
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: read produced EOF
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: read_tpm_buffer_alloc: err_out
freeing buffer
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: command_source_on_input_ready:
removing connection from connection_manager
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: connection_manager_remove:
removing Connection
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: sink_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: resource_manager_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: message_queue_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: on_name_lost:
com.intel.tss2.Tabrmd
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: command_source_on_input_ready:
removing GCancellable
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298: resource_manager_thread:
message_queue_dequeue got obj
** INFO: 12:01:25.298: main_loop_quit
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298:
resource_manager_process_control
** (tpm2-abrmd:32533): DEBUG: 12:01:25.298:
resource_manager_process_control: received CONNECTION_REMOVED message for
connection
** INFO: 12:01:25.298: g_main_loop_run done, cleaning up
** INFO: 12:01:25.298: resource_manager_remove_connection: flushing session
contexts
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: gmain_data_cleanup
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299:
resource_manager_remove_connection: done
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: sink_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: response_sink_enqueue:
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: command_attrs_finalize
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: message_queue_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: resource_manager_unblock:
enqueuing ControlMessage
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: message_queue_dequeue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: response_sink_process_control
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: message_queue_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: response_sink_process_control:
Received CONNECTION_REMOVED message, nothing to do.
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: resource_manager_thread:
message_queue_dequeue got obj
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: handle_map_finalize
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299:
resource_manager_process_control
** (tpm2-abrmd:32533): DEBUG: 12:01:25.299: response_sink_thread: blocking
on input queue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: sink_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: message_queue_dequeue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: response_sink_enqueue:
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: message_queue_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: response_sink_process_control
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: resource_manager_dispose
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: response_sink_process_control:
Received CHECK_CANCEL control code, terminating.
** (tpm2-abrmd:32533): DEBUG: 12:01:25.300: session_list_dispose:
SessionList with 0 entries
** (tpm2-abrmd:32533): DEBUG: 12:01:25.301: session_list_finalize:
SessionList with 0 entries
** (tpm2-abrmd:32533): DEBUG: 12:01:25.301: message_queue_enqueue
** (tpm2-abrmd:32533): DEBUG: 12:01:25.301: ipc_frontend_disconnect
** (tpm2-abrmd:32533): DEBUG: 12:01:25.301: random_finalize
** INFO: 12:01:25.301: main_loop_quit

and then a command prompt.

[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 7600 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tpm2] Re: abrmd crashing - how to debug?
@ 2021-03-09 22:45 Roberts, William C
  0 siblings, 0 replies; 6+ messages in thread
From: Roberts, William C @ 2021-03-09 22:45 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 2732 bytes --]



> -----Original Message-----
> From: Kenneth Goldman <kgoldman(a)us.ibm.com>
> Sent: Tuesday, March 9, 2021 2:17 PM
> Cc: tpm2(a)lists.01.org
> Subject: [tpm2] Re: abrmd crashing - how to debug?
> 
> > From: Tadeusz Struk <tstruk(a)gmail.com>
> > To: Kenneth Goldman <kgoldman(a)us.ibm.com>, tpm2(a)lists.01.org
> > Date: 03/09/2021 02:51 PM
> > Subject: [EXTERNAL] Re: [tpm2] abrmd crashing - how to debug?
> >
> > Hi Ken,
> > On 3/5/21 2:29 PM, Kenneth Goldman wrote:
> > > Ubuntu focal with WSL, abrmd compiled from source
> > >
> > > After about 5 minutes of sending commands, abrmd crashes. I
> > originally found it with keylime, but I can reproduce it with a simple
> > bash loop on pcrread.
> > >
> > > abrmd exits, the tool output is:
> > >
> > > ** (process:21067): CRITICAL **: 17:25:10.862: failed to allocate
> > dbus proxy object: Could not connect: Connection refused
> > > WARNING:tcti:src/tss2-tcti/tctildr.c:79:tcti_from_init() TCTI init
> > for function 0x7ff5f6dbbe10 failed with a0008
> > > WARNING:tcti:src/tss2-tcti/tctildr.c:109:tcti_from_info() Could
> > not initialize TCTI named: tcti-abrmd
> > > ERROR:tcti:src/tss2-tcti/tctildr-dl.c:154:tcti_from_file() Could
> > not initialize TCTI file: tabrmd
> > > ERROR:tcti:src/tss2-tcti/tctildr.c:416:Tss2_TctiLdr_Initialize_Ex
> > () Failed to instantiate TCTI
> > > ERROR: Could not load tcti, got: "tabrmd:bus_name=com.intel.tss2.Tabrmd"
> > >
> > > How would I debug?
> > >
> > > I would expect that nothing that a single application does should
> > crash abrmd.
> >
> > I think it's not the abrmd that's failing, but the application that is
> > trying to use tcti-abrmd to communicate with abrmd running in the
> > background.
> > It can not get the dbus handler so it just prints an error and fails.
> > Can you look for some system dbus logs to see if there are any errors there?
> 
> Sorry, but abrmd exits - with no error message.  Its window just goes back to the
> command prompt.  I'd call that a crash, assuming it should never exit.

It shouldn't under almost all situations. However, some asserts exist on client state, like this bug:
https://github.com/tpm2-software/tpm2-abrmd/issues/723

But the fact that there's no message seems odd. What's the exit code? I would imagine we would see
Something like a segfault message or something else if it truly crashed.

> 
> If you tell me where 'the system dbus logs' are, I'd be willing to post them.

Since you're just running it as a process from a shell and not a system service, all the logs will be to stderr/stdout.
Can you enable env variable G_MESSAGES_DEBUG=all when you run tpm2-abrmd and send us the output?


> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tpm2] Re: abrmd crashing - how to debug?
@ 2021-03-09 20:16 Kenneth Goldman
  0 siblings, 0 replies; 6+ messages in thread
From: Kenneth Goldman @ 2021-03-09 20:16 UTC (permalink / raw)
  To: tpm2

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

> From: Tadeusz Struk <tstruk(a)gmail.com>
> To: Kenneth Goldman <kgoldman(a)us.ibm.com>, tpm2(a)lists.01.org
> Date: 03/09/2021 02:51 PM
> Subject: [EXTERNAL] Re: [tpm2] abrmd crashing - how to debug?
>
> Hi Ken,
> On 3/5/21 2:29 PM, Kenneth Goldman wrote:
> > Ubuntu focal with WSL, abrmd compiled from source
> >
> > After about 5 minutes of sending commands, abrmd crashes. I
> originally found it with keylime, but I can reproduce it with a
> simple bash loop on pcrread.
> >
> > abrmd exits, the tool output is:
> >
> > ** (process:21067): CRITICAL **: 17:25:10.862: failed to allocate
> dbus proxy object: Could not connect: Connection refused
> > WARNING:tcti:src/tss2-tcti/tctildr.c:79:tcti_from_init() TCTI init
> for function 0x7ff5f6dbbe10 failed with a0008
> > WARNING:tcti:src/tss2-tcti/tctildr.c:109:tcti_from_info() Could
> not initialize TCTI named: tcti-abrmd
> > ERROR:tcti:src/tss2-tcti/tctildr-dl.c:154:tcti_from_file() Could
> not initialize TCTI file: tabrmd
> > ERROR:tcti:src/tss2-tcti/tctildr.c:416:Tss2_TctiLdr_Initialize_Ex
> () Failed to instantiate TCTI
> > ERROR: Could not load tcti, got:
"tabrmd:bus_name=com.intel.tss2.Tabrmd"
> >
> > How would I debug?
> >
> > I would expect that nothing that a single application does should
> crash abrmd.
>
> I think it's not the abrmd that's failing, but the application that
> is trying to
> use tcti-abrmd to communicate with abrmd running in the background.
> It can not get the dbus handler so it just prints an error and fails.
> Can you look for some system dbus logs to see if there are any errors
there?

Sorry, but abrmd exits - with no error message.  Its window just goes back
to
the command prompt.  I'd call that a crash, assuming it should never exit.

If you tell me where 'the system dbus logs' are, I'd be willing
to post them.




[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 2503 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-15 11:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 19:50 [tpm2] Re: abrmd crashing - how to debug? Tadeusz Struk
2021-03-09 20:16 Kenneth Goldman
2021-03-09 22:45 Roberts, William C
2021-03-11 17:05 Kenneth Goldman
2022-04-13 10:35 jasonadamses
2022-04-15 11:58 ericc6727

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.