Timed Out when connecting to device via L2CAP bluetooth socket, when LTE chip is integrated - sockets

I'm experiencing a strange issue with one of my applications:
Background:
One of my features requires Bluetooth connectivity. Once a device (i.e. phone) is paired with the host, I continuously "poll" the device, to extract the RSSI (signal strength).
The polling is achieved by connecting to the device on PSM port 0x0001 (1), via Bluetooth sockets on L2CAP, sending an HCI request to query for signal strength, extracting the signal strength, and closing the connection.
Issue:
Everything works fine, and as expected, until I integrate the Simcom 7600G LTE module (Needed for internet connectivity) via PCI.
When I plug the module in, I am no longer able to do an L2CAP Bluetooth socket connection, with an error message of "Time Out" (it will time out depending on what I set the socket.settimeout(...)
As soon as I unplug the LTE module, everything works as expected and I am able to establish the socket connection with the remote Bluetooth device.
Observation:
What is strange is that the Bluetooth discovery and pairing process still works as expected, with the LTE module integrated. It is only the L2CAP Bluetooth sockets that I've written in code (Python) that no longer work, timing out every time a connection is attempted.
So, simply, when the LTE module is not in the PCI slot, everything works flawlessly - the discovery, pairing, BluetoothSocket L2CAP connection, and RSSI querying.
When it is plugged out, the discovery and pairing work, but I get Timed Out when attempting to establish a BluetoothSocket connection via L2CAP. (I've also tried RFCOMM with no luck).
Another strange observation is, when I am monitoring bluetoothctl, I can see the Agent displaying:
[CHG] Device BB:BB:BB:BB:BB:BB Connected: yes
[CHG] Device BB:BB:BB:BB:BB:BB Connected: no
And it displays this in both scenarios, with the LTE module in and out, yet at the application layer, it times out.
Questions and Assumptions:
As a general question, why might this be occurring?
Could it be some form of interference? And if so, given other protocols seem to be working fine, with all other protocols presumably on the same band (2.4GHz), why is it that L2CAP is affected? As far as I understand, the Bluetooth Stack specifies L2CAP as the underlying layer 3 protocol.
If not interference, what other settings could be interfering between
two completely different chips, and network interfaces?
Additional Data:
Test code:
import traceback
import bluetooth
import bluetooth._bluetooth as bt
bt_sock = bluetooth.BluetoothSocket(bluetooth.L2CAP)
bt_sock.settimeout(5)
# [0, 672, 65535, 0, 1, 3, 63]
print(bt_sock.get_l2cap_options())
try:
print("Connecting...")
bt_sock.connect(("BB:BB:BB:BB:BB:BB", 1))
print("Closing...")
bt_sock.close()
except Exception as e:
print(e)
print(traceback.format_exc())
I've run a btmon on my adapter, with the below problem dump:
Bluetooth monitor ver 5.55
= Note: Linux version 5.4.154-5.5.0-devel+git.c65f1622951c (aarch64) 0.210966
= Note: Bluetooth subsystem version 2.22 0.210971
= New Index: AA:AA:AA:AA:AA:AA (Primary,USB,hci0) [hci0] 0.210973
= Open Index: AA:AA:AA:AA:AA:AA [hci0] 0.210973
= Index Info: AA:AA:AA:AA:AA:AA (Marvell Technology Group Ltd.) [hci0] 0.210975
# MGMT Open: bluetoothd (privileged) version 1.14 {0x0001} 0.210976
# RAW Open: python3 (privileged) version 2.22 {0x0002} 13.767587
# RAW Close: python3 {0x0002} 13.767635
# RAW Open: python3 (privileged) version 2.22 {0x0002} [hci0] 13.767704
< HCI Command: Create Connection (0x01|0x0005) plen 13 #1 [hci0] 13.771761
Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Packet type: 0xcc18
DM1 may be used
DH1 may be used
DM3 may be used
DH3 may be used
DM5 may be used
DH5 may be used
Page scan repetition mode: R2 (0x02)
Page scan mode: Mandatory (0x00)
Clock offset: 0x0000
Role switch: Allow slave (0x01)
> HCI Event: Command Status (0x0f) plen 4 #2 [hci0] 13.776071
Create Connection (0x01|0x0005) ncmd 1
Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8 #3 [hci0] 14.798704
Status: Success (0x00)
Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Role: Slave (0x01)
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7 #4 [hci0] 14.804429
Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Page scan repetition mode: R0 (0x00)
> HCI Event: Connect Complete (0x03) plen 11 #5 [hci0] 14.804676
Status: Success (0x00)
Handle: 1
Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Link type: ACL (0x01)
Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2 #6 [hci0] 14.804842
Handle: 1
> HCI Event: Command Status (0x0f) plen 4 #7 [hci0] 14.806679
Read Remote Supported Features (0x01|0x001b) ncmd 1
Status: Success (0x00)
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1 #8 [hci0] 14.806804
Scan enable: No Scans (0x00)
> ACL Data RX: Handle 1 flags 0x02 dlen 10 #9 [hci0] 14.816323
L2CAP: Information Request (0x0a) ident 2 len 2
Type: Extended features supported (0x0002)
> HCI Event: Max Slots Change (0x1b) plen 3 #10 [hci0] 14.822810
Handle: 1
Max slots: 5
> HCI Event: Read Remote Supported Features (0x0b) plen 11 #11 [hci0] 14.826428
Status: Success (0x00)
Handle: 1
Features: 0xbf 0xfe 0x8f 0xfe 0xdb 0xff 0x7b 0x87
3 slot packets
5 slot packets
Encryption
Slot offset
Timing accuracy
Role switch
Sniff mode
Power control requests
Channel quality driven data rate (CQDDR)
SCO link
HV2 packets
HV3 packets
u-law log synchronous data
A-law log synchronous data
CVSD synchronous data
Paging parameter negotiation
Power control
Transparent synchronous data
Broadcast Encryption
Enhanced Data Rate ACL 2 Mbps mode
Enhanced Data Rate ACL 3 Mbps mode
Enhanced inquiry scan
Interlaced inquiry scan
Interlaced page scan
RSSI with inquiry results
Extended SCO link (EV3 packets)
EV4 packets
EV5 packets
AFH capable slave
AFH classification slave
LE Supported (Controller)
3-slot Enhanced Data Rate ACL packets
5-slot Enhanced Data Rate ACL packets
Sniff subrating
Pause encryption
AFH capable master
AFH classification master
Enhanced Data Rate eSCO 2 Mbps mode
Enhanced Data Rate eSCO 3 Mbps mode
3-slot Enhanced Data Rate eSCO packets
Extended Inquiry Response
Simultaneous LE and BR/EDR (Controller)
Secure Simple Pairing
Encapsulated PDU
Erroneous Data Reporting
Non-flushable Packet Boundary Flag
Link Supervision Timeout Changed Event
Inquiry TX Power Level
Enhanced Power Control
Extended features
> HCI Event: Command Complete (0x0e) plen 4 #12 [hci0] 14.834553
Write Scan Enable (0x03|0x001a) ncmd 1
Status: Success (0x00)
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3 #13 [hci0] 14.834600
Handle: 1
Page: 1
> HCI Event: Command Status (0x0f) plen 4 #14 [hci0] 14.836925
Read Remote Extended Features (0x01|0x001c) ncmd 1
Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13 #15 [hci0] 14.845426
Status: Success (0x00)
Handle: 1
Page: 1/2
Features: 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Secure Simple Pairing (Host Support)
LE Supported (Host)
Simultaneous LE and BR/EDR (Host)
Secure Connections (Host Support)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10 #16 [hci0] 14.845484
Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Page scan repetition mode: R2 (0x02)
Page scan mode: Mandatory (0x00)
Clock offset: 0x0000
< ACL Data TX: Handle 1 flags 0x00 dlen 10 #17 [hci0] 14.845502
L2CAP: Information Request (0x0a) ident 1 len 2
Type: Extended features supported (0x0002)
< ACL Data TX: Handle 1 flags 0x00 dlen 16 #18 [hci0] 14.845526
L2CAP: Information Response (0x0b) ident 2 len 8
Type: Extended features supported (0x0002)
Result: Success (0x0000)
Features: 0x000002b8
Enhanced Retransmission Mode
Streaming Mode
FCS Option
Fixed Channels
Unicast Connectionless Data Reception
> HCI Event: Link Supervision Timeout Changed (0x38) plen 4 #19 [hci0] 14.845680
Handle: 1
Timeout: 5000.000 msec (0x1f40)
> HCI Event: Command Status (0x0f) plen 4 #20 [hci0] 14.847801
Remote Name Request (0x01|0x0019) ncmd 1
Status: Success (0x00)
> HCI Event: Remote Name Req Complete (0x07) plen 255 #21 [hci0] 14.859923
Status: Success (0x00)
Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Name: Sasa's S21 Ultra
# MGMT Event: Device Connected (0x000b) plen 31 {0x0001} [hci0] 14.859948
BR/EDR Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Flags: 0x00000000
Data length: 18
Name (complete): Sasa's S21 Ultra
# RAW Close: python3 {0x0002} [hci0] 15.848984
< HCI Command: Disconnect (0x01|0x0006) plen 3 #22 [hci0] 17.852261
Handle: 1
Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4 #23 [hci0] 17.853904
Disconnect (0x01|0x0006) ncmd 1
Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4 #24 [hci0] 17.867262
Status: Success (0x00)
Handle: 1
Reason: Connection Terminated By Local Host (0x16)
# MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 17.867286
BR/EDR Address: BB:BB:BB:BB:BB:BB (OUI AC-6C-90)
Reason: Connection terminated by local host (0x02)
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1 #25 [hci0] 17.920401
Scan enable: Page Scan (0x02)
> HCI Event: Command Complete (0x0e) plen 4 #26 [hci0] 17.924903
Write Scan Enable (0x03|0x001a) ncmd 1
Status: Success (0x00)

Related

Debugging USB serial disconnection on raspberry pi

On one of my raspberry pis (Raspbian OS) with a USB serial device connected, there is periodic disconnection of the serial device while still being registered as a USB device.
lsusb returns a valid Bus Device entry, but there is no corresponding /dev/serial/ entry.
The only way to fix this issue is rebooting the pi, which I'd like to avoid.
I'd love some ideas on how I can debug USB serial connections on a Raspberry Pi Linux platform, or methods to reset the serial connection without requiring a reboot.
We tried:
Tracking udevadm monitor to see USB related events. This is what is seen where we catch a serial disconnection / reconnection happening:
KERNEL[65879.184887] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM1 (tty)
KERNEL[65879.185179] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[65879.185389] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
KERNEL[65879.185728] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
KERNEL[65879.186275] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV [65879.193792] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
UDEV [65879.197016] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM1 (tty)
UDEV [65879.197414] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV [65879.203665] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV [65879.205795] remove /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
==> /var/log/messages <==
Jan 20 18:36:42 rpi4161a-172-101 kernel: [65879.307684] usb 1-1.3: USB disconnect, device number 12
==> /var/log/syslog <==
Jan 20 18:36:42 rpi4161a-172-101 kernel: [65879.307684] usb 1-1.3: USB disconnect, device number 12
KERNEL[65880.121912] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
KERNEL[65880.122424] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[65880.125157] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0 (tty)
KERNEL[65880.125702] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
KERNEL[65880.126324] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV [65880.158159] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV [65880.167588] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV [65880.168004] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
UDEV [65880.169128] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV [65880.177534] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0 (tty)
==> /var/log/messages <==
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.244987] usb 1-1.3: New USB device found, idVendor=****, idProduct=****, bcdDevice= 1.00
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245001] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245010] usb 1-1.3: Product: J-Link Pro OB
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245020] usb 1-1.3: Manufacturer: ****
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.245028] usb 1-1.3: SerialNumber: ****
Jan 20 18:36:43 rpi4161a-172-101 kernel: [65880.248227] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
Jan 20 18:36:43 rpi4161a-172-101 mtp-probe: checking bus 1, device 13: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3"
Jan 20 18:36:43 rpi4161a-172-101 mtp-probe: bus: 1, device: 13 was not an MTP device
Checking if the raspberry pi was overheating, using vcgencmd. It returns 8000 Soft temperature limit has occurred flag sometimes, but not always.
Tried the following method to "reset" the serial connection, which had no effect
echo -n '1-1.3:1.0' | sudo tee -a unbind
echo -n '1-1.3:1.0' | sudo tee -a bind
Followed some of the solutions here: https://raspberrypi.stackexchange.com/questions/9264/how-do-i-reset-a-usb-device-using-a-script, including the solution to reset the USB bus, with no luck.
USB Serial malfunctioning may be caused by many different factors, including software, hardware or noisy environment.
The following diagram roughly describes the related components,
-------------------- ----------------
| Userspace (Apps) | | Power Supply |
-------------------- ----------------
^
|
-------------------- ------------- ----------
| Kernel (Drivers) | <-- | USB Cable | <-- | Device |
-------------------- ------------- ----------
Narrow down to the faulty part
As first step, elimination method can help us to narrow down to the faulty part, basically you replace the suspect part with another good component, and observe if it changes result. for example,
use the latest official raspbian image to eliminate userspace issue
choose a different kernel/firmware image to eliminate kernel/driver issue
change usb cable
change usb device
use a decent power supply
Troubleshooting on software issue
Assume we could narrow down the scope to software, I would use the following procedures to do further check,
Make sure the usb device is recognized by kernel, check with lsusb, dmsg, udevadm.
Have a correct name (dev path), check udev rules;
Run udevadm monitor to observe any unexpected disconnection events, make sure it works (stable connection) on a fresh OS image, and install only necessary packages step by step.
Other tips
Check if your usb device is a "smart" device? meaning the device may have its own logic to disconnect or change mode, so that affect your host side connection.
To see what happened on the USB bus it is better to use usbmon (see https://wiki.wireshark.org/CaptureSetup/USB).
I think you should carefully check usb descriptors: lsusb -v and check how much current it attempts to take (check configuration descriptor: https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-configuration-descriptors).
I think reconnects could occur due to insufficient current to you usb device especially if device supplied only from bus. If current > than usb host controller can provide, usb host-controller limits current this could lead to device reset. To check this hypothesis connect your device to Raspberry using active hub with external power supply.

Pymodbus RTU [Errno 25] Inappropriate ioctl for device

I'm trying to have a modbus RTU client on my Raspberry Pi 4 talking to the modbus synchronous server available in the pymodbus examples (https://pymodbus.readthedocs.io/en/latest/source/example/synchronous_client.html). I set up the server like this:
# RTU:
StartSerialServer(context, framer=ModbusRtuFramer, identity=identity,
port='/dev/ttyAMA0', timeout=.5, baudrate=9600)
What my client does:
from pymodbus.pdu import ModbusRequest
from pymodbus.client.sync import ModbusSerialClient
from pymodbus.transaction import ModbusRtuFramer
import time
import logging
### Logs
FORMAT = ('%(asctime)-15s %(threadName)-15s '
'%(levelname)-8s %(module)-15s:%(lineno)-8s %
(message)s')
logging.basicConfig(format=FORMAT)
log = logging.getLogger()
log.setLevel(logging.DEBUG)
### Modbus RTU stuff
client = ModbusSerialClient(method='rtu', port='/dev/ttyAMA0', baudrate=9600, timeout=.5, parity='N')
client.connect()
client.write_registers(1, 1, unit=1)
client.close()
What I see in server console:
2020-03-24 00:08:14,189 MainThread DEBUG sync :46 Client Connected [/dev/ttyAMA0:/dev/ttyAMA0]
2020-03-24 00:08:14,190 MainThread DEBUG sync :580 Started thread to serve client
Client logs:
2020-03-24 00:09:53,937 MainThread DEBUG transaction :115 Current transaction state - IDLE
2020-03-24 00:09:53,938 MainThread DEBUG transaction :120 Running transaction 1
2020-03-24 00:09:53,939 MainThread DEBUG transaction :219 SEND: 0x1 0x10 0x0 0x1 0x0 0x1 0x2 0x0 0x1 0x66 0x41
2020-03-24 00:09:53,939 MainThread DEBUG sync :75 New Transaction state 'SENDING'
2020-03-24 00:09:53,940 MainThread DEBUG transaction :238 Transaction failed. ([Errno 25] Inappropriate ioctl for device)
2020-03-24 00:09:53,941 MainThread DEBUG rtu_framer :235 Frame - [b''] not ready
2020-03-24 00:09:53,941 MainThread DEBUG transaction :394 Getting transaction 1
2020-03-24 00:09:53,942 MainThread DEBUG transaction :193 Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
I'm really confused by the error message:
[Errno 25] Inappropriate ioctl for device
Up to that point the logs show what I expected (It looks like I can connect and the SEND stuff is correct), but I can't understand what's going on with that error message. On the server side nothing happens in the terminal window. I made sure that with
sudo raspi-config
to disable shell and kernel from the serial connection.
Any idea about what the issue could be? Ty

Break at address "0xXXXXXX" with no debug information available, or outside of program code

Configuration:
Using Nucleo-L476RG. Using GNU ARM Eclipse. I have generated a minimalist code from STM32CubeMX. I have flashed J-link driver in my on board ST-Link.
Have been trying to run debugger for my code but my program counter is not setting at main().Instead it fails to read a certain memory address. The error "Break at address "0xXXXXXXXX" with no debug information available, or outside of program code." appears.
I've included the screenshot and debugger log in which we can see the error.
Please help
IMAGES:
https://ibb.co/bBRHxn https://ibb.co/mGDKA7 https://ibb.co/mE4gOS https://ibb.co/fh5AHn https://ibb.co/jNFMOS https://ibb.co/ibmT3S https://ibb.co/gpJaiS https://ibb.co/jgaMOS
LOGS:
SEGGER J-Link GDB Server V6.30f Command Line Version
JLinkARM.dll V6.30f (DLL compiled Mar 2 2018 17:29:18)
Command line: -if swd -device STM32L476RG -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: STM32L476RG
Target interface: SWD
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link STLink V21 compiled Jun 26 2017 10:35:16
Hardware: V1.00
S/N: 770526094
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes # address 0x00000000 (Data = 0x4C05B510)
Read 2 bytes # address 0x00000000 (Data = 0xB510)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xB9337822)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 4C05B510, MSP= 4C05B510, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = B9337822
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Received monitor command: speed auto
Select auto target interface speed (2000 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Received monitor command: semihosting enable
Semi-hosting enabled (Handle on BKPT)
Received monitor command: semihosting IOClient 1
Semihosting I/O set to TELNET Client
Received monitor command: SWO DisableTarget 0xFFFFFFFF
SWO disabled successfully.
Received monitor command: SWO EnableTarget 0 0 0x1 0
SWO enabled successfully.
Read 4 bytes # address 0xB9337822 (Data = 0x00000000)
Read 2 bytes # address 0xB9337822 (Data = 0x0000)
Downloading 88 bytes # address 0x08000000 - Verified OK
Downloading 8 bytes # address 0x08000058 - Verified OK
Downloading 8 bytes # address 0x08000060 - Verified OK
Comparing flash [....................] Done.
Verifying flash [....................] Done.
Writing register (PC = 0x08000000)
Read 4 bytes # address 0x08000000 (Data = 0x4C05B510)
Read 2 bytes # address 0x08000000 (Data = 0xB510)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xB9337822)
Received monitor command: regs
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000, R13= 4C05B510, MSP= 4C05B510, PSP= 00000000
R14(LR) = FFFFFFFF, R15(PC) = B9337822
XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Starting target CPU...
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
...Target halted (DBGRQ, PC = 0xF3AF4804)
Reading all registers
WARNING: Failed to read memory # address 0xF3AF4804
WARNING: Failed to read memory # address 0x4C05B50C
Reading 64 bytes # address 0x4C05B500
WARNING: Failed to read memory # address 0x4C05B500
WARNING: Failed to read memory # address 0x4C05B508
Reading 64 bytes # address 0x4C05B500
WARNING: Failed to read memory # address 0x4C05B500
WARNING: Failed to read memory # address 0x4C05B508
Reading 64 bytes # address 0xF3AF4800
WARNING: Failed to read memory # address 0xF3AF4800
WARNING: Failed to read memory # address 0xF3AF4804
Reading 64 bytes # address 0xF3AF4800
WARNING: Failed to read memory # address 0xF3AF4800
WARNING: Failed to read memory # address 0xF3AF4804
Reading 64 bytes # address 0xF3AF4800
WARNING: Failed to read memory # address 0xF3AF4800
WARNING: Failed to read memory # address 0xF3AF4806
Your issue might be caused by a missing startup file. Check your compilation console for this message: "warning: cannot find entry symbol Reset_Handler". If you find it, then refer to this other answer: https://stackoverflow.com/a/68381702/3567351.
I encountered the same issue when using j-link to debug my Board(STM32F407ZG), after changing the startup_stm32f407xx.s into startup_stm32f407xx.S(with uppercase 's' ), the problem disappeared. The reason might be gcc handles .s and .S in different ways
Change your startup_xx.s file suffix to uppercase.

Google compute engine boot fails after hardware upgrade to Hashwell

I have a f1-micro instance running on Google Compute Engine running CentOS.
Some time ago I got a mail stating that the zone I am using (us-central1-b) is going through a hardware upgrade to new Hashwell servers, and all instances need to be restarted. So, I did restart. I shut down my services, and performed a restart via the developer dev. console.
But the instance never came up - the boot on the new hardware failed, and now I can not log in to the instance with ssh. I will add the serial console content below this.
My main issue is that there are some content I would really like to get my hands on (nope - didn't do a full backup - shoot!).
How do I restore the instance, when I can not log in using ssh?
Changing serial settings was 0/0 now 3/0
Start bios (version 1.7.2-20150226_170051-google)
Unable to unlock ram - bridge not found
Ram Size=0x26600000 (0x0000000000000000 high)
Relocating low data from 0x000e5810 to 0x000ef780 (size 2161)
Relocating init from 0x000e6081 to 0x265d3540 (size 51612)
CPU Mhz=2301
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
Found 4 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: map device bdf=00:03.0 bar 0, addr 0000c000, size 00000040 [io]
PCI: map device bdf=00:04.0 bar 0, addr 0000c040, size 00000040 [io]
PCI: map device bdf=00:03.0 bar 1, addr febfe000, size 00001000 [mem]
PCI: map device bdf=00:04.0 bar 1, addr febff000, size 00001000 [mem]
PCI: init bdf=00:01.0 id=8086:7110
PIIX3/PIIX4 init: elcr=00 0c
PCI: init bdf=00:01.3 id=8086:7113
Using pmtimer, ioport 0xb008, freq 3579 kHz
PCI: init bdf=00:03.0 id=1af4:1004
PCI: init bdf=00:04.0 id=1af4:1000
Found 1 cpu(s) max supported 1 cpu(s)
MP table addr=0x000fdaf0 MPC table addr=0x000fdb00 size=240
SMBIOS ptr=0x000fdad0 table=0x000fd990 size=314
Memory hotplug not enabled. [MHPE=0xffffffff]
ACPI DSDT=0x265fe070
ACPI tables: RSDP=0x000fd960 RSDT=0x265fe030
Scan for VGA option rom
Machine UUID 2b33f2bc-6042-1f12-c61f-0edd33ff965d
Found 0 serial ports
found virtio-scsi at 0:3
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#0,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#1,0
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=20971520
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#2,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#3,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#4,0
....
....
....
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#248,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#249,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#250,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#251,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#252,0
Searching bootorder for: /pci#i0cf8/*#3/*#0/*#253,0
KBD: int09 handler: AL=0
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: HALT
drive 0x000fd920: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520
Space available for UMB: 000c0000-000eb800
Returned 122880 bytes of ZoneHigh
e820 map has 6 items:
0: 0000000000000000 - 000000000009fc00 = 1 RAM
1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
3: 0000000000100000 - 00000000265fe000 = 1 RAM
4: 00000000265fe000 - 0000000026600000 = 2 RESERVED
5: 00000000fffbc000 - 0000000100000000 = 2 RESERVED
Unable to lock ram - bridge not found
KBD: int09 handler: AL=0
Changing serial settings was 3/2 now 3/0
enter handle_19:
NULL
Booting from Hard Disk 0...
Booting from 0000:7c00
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.32-431.17.1.el6.x86_64 (mockbuild#c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Wed May 7 23:32:49 UTC 2014
Command line: ro root=UUID=a8cf6ab7-92fb-42c6-b95f-d437f94aaf98 rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD KEYTABLE=us SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM console=ttyS0,38400n8 rd_NO_DM
KERNEL supported cpus:
Intel GenuineIntel
AMD AuthenticAMD
Centaur CentaurHauls
Disabled fast string operations
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000265fe000 (usable)
BIOS-e820: 00000000265fe000 - 0000000026600000 (reserved)
BIOS-e820: 00000000fffbc000 - 0000000100000000 (reserved)
DMI 2.4 present.
SMBIOS version 2.4 # 0xFDAD0
Hypervisor detected: KVM
last_pfn = 0x265fe max_arch_pfn = 0x400000000
x86 PAT enabled: cpu 0, old 0x70106, new 0x7010600070106
Using GB pages for direct mapping
init_memory_mapping: 0000000000000000-00000000265fe000
RAMDISK: 25f82000 - 265ed02e
ACPI: RSDP 00000000000fd960 00014 (v00 Google)
ACPI: RSDT 00000000265fe030 00034 (v01 Google GOOGRSDT 00000001 GOOG 00000001)
ACPI: FACP 00000000265fff00 000F4 (v02 Google GOOGFACP 00000001 GOOG 00000001)
ACPI: DSDT 00000000265fe070 015B6 (v01 GOOG GODSDT 00000001 INTL 20140214)
ACPI: FACS 00000000265ffec0 00040
ACPI: SSDT 00000000265ff780 0073D (v01 Google GOOGSSDT 00000001 GOOG 00000001)
ACPI: APIC 00000000265ff660 0006E (v01 Google GOOGAPIC 00000001 GOOG 00000001)
ACPI: WAET 00000000265ff630 00028 (v01 Google GOOGWAET 00000001 GOOG 00000001)
Setting APIC routing to flat.
No NUMA configuration found
Faking a node at 0000000000000000-00000000265fe000
Bootmem setup node 0 0000000000000000-00000000265fe000
NODE_DATA [0000000000009000 - 000000000003cfff]
bootmap [000000000003d000 - 0000000000041cbf] pages 5
(7 early reservations) ==> bootmem [0000000000 - 00265fe000]
#0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
#1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
#2 [0001000000 - 0002020aa4] TEXT DATA BSS ==> [0001000000 - 0002020aa4]
#3 [0025f82000 - 00265ed02e] RAMDISK ==> [0025f82000 - 00265ed02e]
#4 [000009fc00 - 0000100000] BIOS reserved ==> [000009fc00 - 0000100000]
#5 [0002021000 - 00020210a5] BRK ==> [0002021000 - 00020210a5]
#6 [0000008000 - 0000009000] PGTABLE ==> [0000008000 - 0000009000]
found SMP MP-table at [ffff8800000fdaf0] fdaf0
crashkernel=auto resulted in zero bytes of reserved memory.
kvm-clock: Using msrs 4b564d01 and 4b564d00
kvm-clock: cpu 0, msr 0:1c247c1, boot clock
Zone PFN ranges:
DMA 0x00000001 -> 0x00001000
DMA32 0x00001000 -> 0x00100000
Normal 0x00100000 -> 0x00100000
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
0: 0x00000001 -> 0x0000009f
0: 0x00000100 -> 0x000265fe
ACPI: PM-Timer IO Port: 0xb008
Setting APIC routing to flat.
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
Using ACPI (MADT) for SMP configuration information
SMP: Allowing 1 CPUs, 0 hotplug CPUs
PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000
PM: Registered nosave memory: 00000000000f0000 - 0000000000100000
Allocating PCI resources starting at 26600000 (gap: 26600000:d99bc000)
Booting paravirtualized kernel on KVM
NR_CPUS:4096 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
PERCPU: Embedded 31 pages/cpu #ffff880002200000 s94872 r8192 d23912 u2097152
pcpu-alloc: s94872 r8192 d23912 u2097152 alloc=1*2097152
pcpu-alloc: [0] 0
kvm-clock: cpu 0, msr 0:22167c1, primary cpu clock
Built 1 zonelists in Node order, mobility grouping on. Total pages: 154835
Policy zone: DMA32
Kernel command line: ro root=UUID=a8cf6ab7-92fb-42c6-b95f-d437f94aaf98 rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD KEYTABLE=us SYSFONT=latarcyrheb-sun16 rd_NO_LVM console=ttyS0,38400n8 rd_NO_DM
PID hash table entries: 4096 (order: 3, 32768 bytes)
xsave/xrstor: enabled xstate_bv 0x7, cntxt size 0x340
Checking aperture...
No AGP bridge found
Memory: 594376k/628728k available (5326k kernel code, 392k absent, 33960k reserved, 7013k data, 1280k init)
Hierarchical RCU implementation.
NR_IRQS:33024 nr_irqs:256
Console: colour *CGA 80x25
console [ttyS0] enabled
allocated 2621440 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Detected 2299.982 MHz processor.
Calibrating delay loop (skipped) preset value.. 4599.96 BogoMIPS (lpj=2299982)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux: Initializing.
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount-cache hash table entries: 256
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
Initializing cgroup subsys net_prio
Disabled fast string operations
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 32 MCE banks
alternatives: switching to unfair spinlock
SMP alternatives: switching to UP code
Freeing SMP alternatives: 36k freed
ACPI: Core revision 20090903
ftrace: converting mcount calls to 0f 1f 44 00 00
ftrace: allocating 21778 entries in 86 pages
Enabling x2apic
Enabled x2apic
APIC routing finalized to physical x2apic.
..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1
CPU0: Intel(R) Xeon(R) CPU # 2.30GHz stepping 00
Performance Events: unsupported p6 CPU model 63 no PMU driver, software events only.
NMI watchdog disabled (cpu0): hardware events not enabled
Brought up 1 CPUs
Total of 1 processors activated (4599.96 BogoMIPS).
devtmpfs: initialized
regulator: core version 0.5
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
ACPI: Interpreter enabled
ACPI: (supports S0 S3 S4 S5)
ACPI: Using IOAPIC for interrupt routing
ACPI: No dock devices found.
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7]
pci_root PNP0A03:00: host bridge window [io 0x0d00-0xffff]
pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
pci_root PNP0A03:00: host bridge window [mem 0x26600000-0xfebfffff]
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7]
pci_bus 0000:00: root bus resource [io 0x0d00-0xffff]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
pci_bus 0000:00: root bus resource [mem 0x26600000-0xfebfffff]
pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
Switching to clocksource kvm-clock
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 8 devices
ACPI: ACPI bus type pnp unregistered
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 6572k freed
audit: initializing netlink socket (disabled)
type=2000 audit(1430203988.308:1): initialized
HugeTLB registered 2 MB page size, pre-allocated 0 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 1173
alg: No test for stdrng (krng)
ksign: Installing public key data
Loading keyring
- Added public key A760F53BCC8FA210
- User ID: CentOS (Kernel Module GPG key)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
pciehp: PCI Express Hot Plug Controller Driver version: 0.4
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
ipmi message handler version 39.2
IPMI System Interface driver.
ipmi_si: Adding default-specified kcs state machine
ipmi_si: Trying default-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
ipmi_si: Interface detection failed
ipmi_si: Adding default-specified smic state machine
ipmi_si: Trying default-specified smic state machine at i/o address 0xca9, slave address 0x0, irq 0
ipmi_si: Interface detection failed
ipmi_si: Adding default-specified bt state machine
ipmi_si: Trying default-specified bt state machine at i/o address 0xe4, slave address 0x0, irq 0
ipmi_si: Interface detection failed
ipmi_si: Unable to find any System Interface(s)
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
ACPI: Sleep Button [SLPF]
[Firmware Bug]: No valid trip found
GHES: HEST is not enabled!
Non-volatile memory driver v1.3
Linux agpgart interface v0.103
crash memory driver: version 1.1
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
�serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
serial8250: ttyS2 at I/O 0x3e8 (irq = 6) is a 16550A
Refined TSC clocksource calibration: 2300.003 MHz.
serial8250: ttyS3 at I/O 0x2e8 (irq = 7) is a 16550A
00:04: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:05: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:06: ttyS2 at I/O 0x3e8 (irq = 6) is a 16550A
00:07: ttyS3 at I/O 0x2e8 (irq = 7) is a 16550A
brd: module loaded
loop: module loaded
input: Macintosh mouse button emulation as /devices/virtual/input/input2
Fixed MDIO Bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
i8042.c: Warning: Keylock active.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
rtc_cmos 00:01: RTC can wake from S4
rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one day, 114 bytes nvram
cpuidle: using governor ladder
cpuidle: using governor menu
EFI Variables Facility v0.08 2004-May-17
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
GRE over IPv4 demultiplexor driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
registered taskstats version 1
rtc_cmos 00:01: setting system clock to 2015-04-28 06:53:10 UTC (1430203990)
Initalizing network drop monitor service
Freeing unused kernel memory: 1280k freed
Write protecting the kernel read-only data: 10240k
Freeing unused kernel memory: 800k freed
Freeing unused kernel memory: 1584k freed
dracut: dracut-004-336.el6_5.2
dracut: rd_NO_LUKS: removing cryptoluks activation
dracut: rd_NO_LVM: removing LVM activation
udev: starting version 147
dracut: Starting plymouth daemon
dracut: rd_NO_MD: removing MD RAID activation
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
%GFATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input4
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
dracut Warning: No root device "block:/dev/disk/by-uuid/a8cf6ab7-92fb-42c6-b95f-d437f94aaf98" found
%GFATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-431.17.1.el6.x86_64/modules.dep: No such file or directory
dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.
dracut Warning: Signal caught!
dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-431.17.1.el6.x86_64 #1
Call Trace:
[<ffffffff815274ef>] ? panic+0xa7/0x16f
[<ffffffff81077292>] ? do_exit+0x862/0x870
[<ffffffff8118a525>] ? fput+0x25/0x30
[<ffffffff810772f8>] ? do_group_exit+0x58/0xd0
[<ffffffff81077387>] ? sys_exit_group+0x17/0x20
[<ffffffff8100b072>] ? system_call_fastpath+0x16/0x1b
I suggest at first to follow standard troubleshooting steps to validate the disk's filesystem as documented.
Then you can try to snapshot the disk and create a new instance with boot disk from snapshot to avoid exclude a disk UUID conflict.
Finally you can try to attach the disk to recover the files to a brand new instance as I suggested in my previous comment.
If you can not validate the filesystem as per troubleshooting guide the data is most probably lost and nothing more can be done to recover it.
Please note as a good practice to take care of either periodic snapshot, GCS differentiual backup or other replication method.
Thank you.
Sincerely,
P.

Debugging - GNU ARM Bare Metal Development

I am trying to debug a sample code given by Atmel. I have built the program successfully.
For debugging, I am using eclipse plusgdb plus JlinkGDBServer plus onboard Jtag.
Although the program can be downloaded to the board and is running well, I can't debug the program. Everytime I launch a debug session, the JLinkGDBServer will be terminated with an error as below:
Below are the messages shown in the console for each program termination:
JLinkGDBServer
SEGGER J-Link GDB Server V4.96g Command Line Version
JLinkARM.dll V4.96g (DLL compiled Feb 6 2015 17:54:32)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: on
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 5 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: Cortex-A5
Target interface: JTAG
Target interface speed: 1000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128 V1 compiled Nov 28 2014 10:24:11
Hardware: V1.00
S/N: 480300770
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 1 JTAG device, Total IRLen = 4
JTAG ID: 0x4BA00477 (Cortex-A5)
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes # address 0x00000000 (Data = 0xE59FF070)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x00000000)
PC = 00000000, CPSR = 000001D3 (SVC mode, ARM FIQ dis. IRQ dis.)
R0 = 00000004, R1 = 0031E0C3, R2 = 00016AAD, R3 = 00016965
R4 = 0031FFA0, R5 = C0542A08, R6 = C0512000, R7 = C051DA90
USR: R8 =C051DD80, R9 =410FC051, R10=C0512000, R11 =0031FF94, R12 =003020C0
R13=BEBF5C70, R14=B6F12F1C
FIQ: R8 =9ABE0586, R9 =7E72A55E, R10=73DBFC6B, R11 =4F6717CF, R12 =05EDA809
R13=5AC81462, R14=24683958, SPSR=370D2C67
SVC: R13=0031FF80, R14=00300620, SPSR=000001D3
ABT: R13=C0542B4C, R14=C000DC80, SPSR=A0000193
IRQ: R13=00320000, R14=80000053, SPSR=80000053
UND: R13=C0542B58, R14=C000DB60, SPSR=60000093
Reading all registers
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET and GDB Client
Downloading 15488 bytes # address 0x00300000 - Verified OK
Writing register (PC = 0x00300080)
GDB closed TCP/IP connection
Connected to 127.0.0.1
Reading all registers
Read 4 bytes # address 0x00300080 (Data = 0xF1080100)
Resetting target
Writing register (PC = 0x00300000)
Writing register (PC = 0x00300000)
Starting target CPU...
GDB closed TCP/IP connection
arm-none-eabi-gdb
Warning: the current language does not match this frame.
The target endianness is set automatically (currently little endian)
Semihosting and SWV
SEGGER J-Link GDB Server V4.96g - Terminal output channel
Connection closed by the GDB server.
The following is my debugging configuration:
Under the Run Commands, the commands in the box are as below:
target remote localhost:2331
monitor reset
load
mon reg pc = 0x300000
mon reg pc = 0x300000
end
I dont know what root cause is. I suspect that it is arm-none-eabi-gdb that causes the JLinkGDBServer to terminate with an exit code of -1.
Please help.
Edit 1
FYI, I am using SAMA5D3x-EK development board.
It is difficult to say, but looks like if the processor is having an exception while loading your code. I suggest to verify the load address of the sections of your ELF file, and review the linker settings of your project.
Hope it helps...