Module 12 · Lesson 113 of 114

Diagnostics, logging and update practicals

Dissect a SOME/IP capture, correlate DLT records with packet timestamps, and demonstrate a signed UCM-lite update, rollback, and tamper rejection.

  • Beginner to advanced
  • 9 min read
  • 55 min lab
What you will need

Ubuntu 24.04 in WSL2 or a VM; Wireshark; a SensorNode SOME/IP capture and matching DLT export; the course SensorNode UCM-lite setup, two builds, and its package signing tools

Your place in the module
By the end you can 4 objectives
  • Annotate every SOME/IP-SD, method, and event message in an assessment capture.
  • Correlate selected DLT records with packet timestamps using identifiers and a documented clock alignment.
  • Demonstrate a UCM-lite update and rollback while verifying persisted values through application reads.
  • Sign a package and demonstrate that UCM-lite rejects a modified copy before activation.
Video coming soonDiagnostics, logging and update practicals
The video for this lesson is being recorded. Read the lesson below in the meantime.
Recall first from Services and execution health practicals
  • An end-to-end service test exercises runtime discovery, the proxy and skeleton, and the deployed service instance.
  • Known payload bytes provide an independent check of the serializer and decoder.
  • An execution dependency can gate startup on reported readiness.
01

Practical 3: Explain what each frame shows

4 min read

The first practicals are clear. This lesson answers how the last practicals assess trace dissection and a signed update with rollback.

A client can receive an acknowledgement for a subscription and still report that it received no sensor samples. The acknowledgement records acceptance of the subscription. To diagnose the missing samples, you need to find out whether the provider sent any notifications and whether the client handled them. On Linux, packet sockets observe traffic at the device driver level, where an application callback is outside the scope of that observation. This is why the assessment asks you to read the capture alongside the application log. packet(7)

Open the supplied capture in Wireshark and keep the SensorNode interface and endpoint configuration beside it. Record the capture interface and any known capture limits. Use the original frame number so another reader can find the same bytes. Make a row for every SOME/IP or SOME/IP-SD message in scope, including repeats. If a frame carries multiple messages, use multiple rows with the same frame number. If a SOME/IP message spans TCP segments, identify the reassembled message and the contributing frames. For each row, record the timestamp, direction, message type, relevant identifiers, and a short explanation of what the message shows.

For service discovery, read the entries and their options. A FindService entry describes what the sender is looking for. An OfferService entry advertises a service instance. Record the service and instance IDs, relevant version fields, TTL, and advertised endpoint options. Read the advertised address, transport, and port from the relevant option. The source of the SD packet identifies the sender as seen at the capture point. If an offer has a zero TTL, interpret it as a withdrawal. If several offers look alike, check the instance, endpoint, and TTL before describing them as repeated offers for the same service. Explain each entry when one SD message carries several.

For a SubscribeEventgroup entry, name the subscribing endpoint, service instance, and eventgroup. Use the subscription's endpoint options where present. Match the corresponding acknowledgement by service instance, eventgroup, direction, and subscription counter. An acknowledgement with a positive TTL records acceptance for that duration. A SubscribeEventgroupAck entry with zero TTL indicates rejection of the subscription. Separate subscription renewal from initial acceptance if the recording shows both. If the trace starts after discovery, identify the first message you actually see and state that earlier exchanges are outside the recorded interval.

For each method exchange, use the service and method IDs to name the operation. Pair a request with its response or error using the Client ID and Session ID in the Request ID, the matching service and method IDs, and the reverse direction on the same exchange. Read the response message type and return code before calling the exchange successful. A request marked as no-return has no response to pair. If a regular request has no visible reply, record that observation and check how much time remains in the capture. For each notification, identify the service and event ID, direction, and destination. Use the interface definition to relate the event ID to its eventgroup. Apply the same explanation to repeated notifications, while recording each occurrence separately.

Messages in a service exchangeClientProviderFindServiceOfferServiceSubscribeEventgroupSubscribeEventgroupAckMethod requestMethod responseEvent notification1. Client → ProviderFindService2. Provider → ClientOfferService3. Client → ProviderSubscribeEventgroup4. Provider → ClientSubscribeEventgroupAck5. Client → ProviderMethod request6. Provider → ClientMethod response7. Provider → ClientEvent notification
An example message sequence to compare with the exchanges actually present in the capture
02

Practical 3: Correlate the DLT records with the capture

3 min read

Use the DLT records from the same run as the capture. Identify the ECU, application ID, and context ID for each record you use. Read the log text for the action and any identifiers it exposes. If both client and provider log a method, label which record describes sending the request, handling it, or receiving the response. The log level describes the application’s classification of the message. The application and context identify where it came from, and the text and identifiers say what to match.

Write down which timestamp each data source uses. For the packet capture, record whether the displayed value is absolute or relative to the capture. For the DLT export, identify the selected field and whether it represents a sender-relative timestamp or a wall-clock timestamp associated with recording or reception. Preserve the original time and units in your notes. Use a common time basis for the comparison and record how you obtained it. Linux provides both wall-clock and monotonic clocks with different origins. Converting units alone cannot align readings from different origins. The capture timestamp also describes observation at the capture point. clock_gettime(3) socket(7)

If you have a verified shared clock, use it and record the timestamp precision and any known synchronization error. Otherwise, find a distinct exchange you can identify independently on both sides. A method request whose service, method, and Request ID appear in a client send log is one candidate. Put both timestamps in the same units, then subtract the log time from the capture time to estimate the offset for that source. Add the estimated offset to subsequent log times and check a second independently identifiable exchange. The first pair includes whatever time passed between writing the log and observing the packet. Treat the result as an approximate alignment. If the second pair disagrees substantially, report that uncertainty and check for drift, different timestamp fields, or a restart. Logs from different ECUs or boot intervals may need separate alignment.

For each correlation, report the frame number and capture time, the DLT record and original timestamp, the adjusted log time, and the difference. State what identified the match. For an event, a logged sample sequence or another payload value can help distinguish successive notifications with the same event ID. Use that value only when the schema lets you decode it and the DLT record contains it. Where only the event ID and approximate time are available, state which records remain plausible. A tidy timeline with a guessed match gives the assessor less information than a timeline that marks the ambiguity and explains it.

Finish with one conclusion tied to the observations. If you can see the subscription acknowledgement and a matching notification but cannot find a client callback record, you have evidence of notification traffic at the capture point. Check the capture location and the client’s enabled log contexts before deciding how far the notification travelled. If you only see the acknowledgement, inspect the provider logs for subscription handling and publication. A missing record can reflect the capture window, logging filters, or the absence of the action itself. State which possibilities the supplied evidence lets you resolve.

Correlating capture and DLT timesMatchoperationidentifiersIdentifytimestamporiginsAligntimestampsChecksecondmatchRecordtiminguncertaintyMatchoperationidentifiersIdentifytimestamporiginsAligntimestampsChecksecondmatchRecordtiminguncertainty
Identifiers establish candidate matches, and a common time basis lets you compare their timestamps
03

Practical 4: Prove the update, rollback, and signature check

4 min read

The update practical asks you to show what UCM-lite did to the active software and what each running build could read from persistency. Work with the two assessment builds from the SensorNode project. Use the package format, verification key setup, and rollback procedure supplied with that UCM-lite implementation. Choose an earlier and a candidate build that the exercise supports for rollback. Record their build identifiers and how you will obtain the identifier from the running application. The version on a package filename establishes which file you intended to install. The running build identifier establishes what actually started.

Start the earlier build and write a distinctive value through the application's normal persistency interface. Pick a value you can distinguish from a default and from other runs. Use the application's normal commit or close operation as required by the storage interface. Read the exact value back after a fresh application start. This establishes a baseline on disk before deployment. A read through an already-open process can be satisfied from an in-memory value. A fresh-start read tests persistence across the update's process transitions. Claims about sudden power loss need separate evidence about flushing data and, where relevant, parent directory entries. fsync(2)

Prepare the candidate package and sign the bytes defined by the course package format with the signing private key. Put the corresponding trusted public key in the verifier's configuration through the course setup. If the signature covers a manifest containing payload hashes, the verifier must also check those hashes against the actual payload. Keep an untouched copy of the signed package and, for a detached signature, its signature file. Record enough information to identify those inputs in both runs. A local verification result helps diagnose signing setup. The assessment needs evidence that UCM-lite itself accepted the authentic package and reached the appropriate update state.

Submit the signed candidate and follow the UCM-lite procedure through activation. Record the package identity, verification result, update outcome, and active build. Confirm the running application reports the candidate build and can perform the assessment's normal service check. Read back the baseline value through that build. If the practical supports writes that are compatible with the earlier build, write a distinct second value and commit it normally. That value can prove that rollback kept newly committed data as well as the baseline.

Invoke rollback through UCM-lite while the earlier build is still a valid rollback target. Record the manager's rollback outcome. Start or reconnect to the restored application as directed by the course procedure, confirm its build identity, and repeat the service check and persistency reads. Compare exact key/value pairs with your earlier records. For the shared-store case with a compatible second write, the restored build should read both values. If your exercise defines a restored storage snapshot, record the expected snapshot values before rolling back and compare against that policy. A successful activation followed by a successful rollback gives you two software transitions to explain. Each needs a fresh observation of the running build and the data it can read.

For the tamper test, confirm the active build and current values immediately before submitting the altered input. Copy the authentic package and modify bytes that the verification process authenticates. With a directly signed package, keep the original signature for the modified bytes. With a signed manifest that lists payload hashes, preserve the signed manifest and change a payload byte without updating the expected hash. Use the exercise's package tooling to keep the modified package readable by the parser. That way, a rejection can be attributed to signature or payload integrity verification rather than to an unreadable archive. Submit the altered package with the same verifier configuration. Preserve the explicit verification failure and confirm that the active build and persisted values stayed at their pre-test values.

Update and rollback evidenceReadbaselinedataSignpackageVerifypackageActivatecandidateExit from step 3: Verification failsReject packageReadpersisteddataRoll backReadpersisteddataReadbaselinedataSignpackageVerifypackageActivatecandidateExit from step 3:Verification failsReject packageReadpersisteddataRoll backReadpersisteddata
The authentic package proceeds to activation and rollback, while the modified copy must fail verification

Before submitting, choose one observation from each practical that another person can reproduce from your evidence. For the trace, give the frame and DLT record identifiers and the timestamp basis. For the update, give the running build and the exact application read at each checkpoint, plus the verification result for the modified package. Code review, the rubric and retrospective follows these demonstrations and explains how the assessment reviews the implementation and the evidence you collected.

Key takeaways

  • An SD acknowledgement confirms acceptance of an eventgroup subscription, while a notification provides evidence of event traffic.
  • A DLT record and a packet can describe the same operation at different points in its execution.
  • Rollback evidence includes the running build and the persisted values it reads after a fresh start.
  • A controlled tamper test keeps the original signature and changes bytes covered by it.
Reflect
  1. Explain to a colleague, in two sentences: annotate every SOME/IP-SD, method, and event message in an assessment capture.
  2. Which objective are you least sure about? Re-read that section, then do its exercise in the practice pack.
  3. What surprised you when you ran the commands yourself?
On a real board

Repeat the key commands on your Raspberry Pi or lab board over SSH or the serial console. Note anything that behaves differently from your PC, such as missing tools, a BusyBox shell or a read-only filesystem.

References and further reading

Find your next step

↑ ↓ to move · Enter to open · Esc to close