anyone interested to help me in figuring out what i'm doing wrong in my code? I using AllocVecTags to get memory from the system. Normally it works, except suddenly a call to it fails, with the following output via the serial port. The output is mainly from my program except for the kernel at the end, which i cannot make any sens of.
kernel 54.30 (1.1.2021) AmigaOne X5000 release
Machine model: 9 (AmigaOne X5000/20)
Dump of context at 0xEFDB5000
Trap type: DSI exception
DSISR: 00800000 DAR: 00006625
No matching page found
Machine State (raw): 0x0002F030
Machine State (verbose): [Critical Ints on] [ExtInt on] [User] [IAT on] [DAT on]
Instruction pointer: in module kernel+0x00033438 (0x01833438)
Crashed process: rea:smbv2/smbv2.debug (0x697634A0)
DSI verbose error description: Access to address 0x00006625 not allowed by page protection in user state (protection violation)
Access was a store operation
Exception Syndrome Register: 0x00800000
0: 0184ABB0 66BF89D0 00000002 6991A890 6991AFDC 00000000 00000050 66BF8AA0
8: FFFFFFFF 00006621 6991AFDC 66BF89F8 3B553959 6D411850 6D28D8F0 00000001
16: 6D5DF410 EFE17F00 6709D010 00000000 0215B136 02150000 02150000 02008418
24: 022BECC2 02150000 EFFF9054 00000000 6991AFDC 6991AFD0 EFFF9010 0215A968
CR: 95553595 XER: 8000007E CTR: 01833418 LR: 0184AA78
I had this once, and figure out that before AllocVecTags fails, i previously allocated memory with less size than expected and wrote over the allocated space, which seems to disturb AllocVecTags during the following call. I can not see that i'm still doing it. So what else can make AllocVecTags fails?
If anyoue want to know what the programm is inteded to do at some point: Currently it aim is it to implement the authentication procedure for a smbv2 client.
My SMB2 shared object is a Windows10 machine sharing a plain folder (called SHARED), seems nothing shows/happens, and pressed CTRL+C, got those FEFECAFE (unfreed' signals or data?) Can be a (small) stack issue?
Serial output::
Nuevo proceso Shell 12
#APPDIR:Sashimi
Sashimi installed ([Ctrl]+C or "Break 12" to remove)
...
[_impl_InitResident] Initializing native autoinit amisslmaster.library V4, priority 0
[_impl_AddLibrary] Adding library amisslmaster.library to the system
[_impl_InitResident] amisslmaster.library V4 initialized
[_impl_InitResident] Initializing native autoinit amissl_v111m.library V4, priority 0
[_impl_AddLibrary] Adding library amissl_v111m.library to the system
[_impl_InitResident] amissl_v111m.library V4 initialized
[SMB2] INFO | 'start' | Socket created: 0
[SMB2] INFO | 'start' | Host name: 192.168.1.58
[SMB2] INFO | 'start' | Host port: 445
[_impl_InitResident] Initializing native autoinit uuid.library V1, priority 0
[_impl_AddLibrary] Adding library uuid.library to the system
[_impl_InitResident] uuid.library V1 initialized
[_impl_AddTask] Adding Task 0x69722df0, RANDOM/Random-Handler 52.1 (0x6a5f4c80)
[SMB2] DEBUG | 'network' | Dump read packet structure at address 0x67fc41f8
[SMB2] DEBUG | 'network' | Start address 0x67fc4210
[SMB2] DEBUG | 'network' | End address 0x67fd420f, capacity 65535
[SMB2] DEBUG | 'network' | Read address 0x67fc4210, Write address 0x67fc4210, available 0 bytes
[SMB2] DEBUG | 'network' | Is Empty
[SMB2] INFO | 'start' | Host uuid: 01feaa8b-0baf-4164-b675-0ed3a51c6138
[SMB2] INFO | 'start' | Connecting to '192.168.1.58:445'...
[SMB2] DEBUG | 'start' | Socket connected
[SMB2] DEBUG | 'start' | Configured keep Alive
[SMB2] DEBUG | 'start' | Configured TCP No delay
[SMB2] DEBUG | 'smbv2' | Negotiate Protocol Request:
[SMB2] DEBUG | 'smbv2' | SMB2 Header [Request]:
[SMB2] DEBUG | 'smbv2' | ProtocolId: 0xfe534d42
[SMB2] DEBUG | 'smbv2' | Header Length: 64
[SMB2] DEBUG | 'smbv2' | Credit Charge: 0
[SMB2] DEBUG | 'smbv2' | Status: 0x00000000
[SMB2] DEBUG | 'smbv2' | Serverity: Sucess
[SMB2] DEBUG | 'smbv2' | Defined by: Customer
[SMB2] DEBUG | 'smbv2' | Command: Negotiate protocol
[SMB2] DEBUG | 'smbv2' | Credit requested: 126
[SMB2] DEBUG | 'smbv2' | Flags: 0x00000000
[SMB2] DEBUG | 'smbv2' | Next command/Chain offset: 0
[SMB2] DEBUG | 'smbv2' | Message ID: 0x TODO
[SMB2] DEBUG | 'smbv2' | Process Id: 00000000
[SMB2] DEBUG | 'smbv2' | Tree Id: 00000000
[SMB2] DEBUG | 'smbv2' | Session ID: 0x TODO
[SMB2] DEBUG | 'smbv2' | Signature: 0x TODO
[SMB2] DEBUG | 'smbv2' | StructureSize: 0x0024
[SMB2] DEBUG | 'smbv2' | Fixed Length Part: 18
[SMB2] DEBUG | 'smbv2' | Dynamic Part: False
[SMB2] DEBUG | 'smbv2' | Dialect Count: 1
[SMB2] DEBUG | 'smbv2' | SecurityMode: 0x01
[SMB2] DEBUG | 'smbv2' | Signing enabled: True
[SMB2] DEBUG | 'smbv2' | Signing required: False
[SMB2] DEBUG | 'smbv2' | Reserved: 0x00
[SMB2] DEBUG | 'smbv2' | Capabilities: 0x00000000
[SMB2] DEBUG | 'smbv2' | DFS: False
[SMB2] DEBUG | 'smbv2' | LEASING: False
[SMB2] DEBUG | 'smbv2' | LARGE MTU: False
[SMB2] DEBUG | 'smbv2' | MULTI CHANNEL: False
[SMB2] DEBUG | 'smbv2' | PERSISTENS HANDLES: False
[SMB2] DEBUG | 'smbv2' | DIRECTORY LEASING: False
[SMB2] DEBUG | 'smbv2' | ENCYRPTION: False
[SMB2] DEBUG | 'smbv2' | Client Guid: 8baafe01-af0b-6441-b675-0ed3a51c6138
[SMB2] DEBUG | 'smbv2' | smb2:
[SMB2] DEBUG | 'smbv2' | ClientStartTime: TODO
[SMB2] DEBUG | 'smbv2' | smbVx311:
[SMB2] DEBUG | 'smbv2' | NegotiateContextOffset: 0x00000000
[SMB2] DEBUG | 'smbv2' | NegotiateContextCount: 0x00
[SMB2] DEBUG | 'smbv2' | Reserved: 0x00
[SMB2] DEBUG | 'smbv2' | Dialect (0x202):
[SMB2] DEBUG | 'network' | NETWORK_DataBuffer_writeBytes: Buffered 108 bytes
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 108
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Write to socket request
[SMB2] DEBUG | 'network' | NETWORK_sendBytes: Trying to send 108 bytes
[SMB2] DEBUG | 'network' | NETWORK_sendBytes: Successfull send 108 bytes?
[SMB2] DEBUG | 'smbv2' | SMB2_Free: Freed a packet
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 65535 bytes into 0x67fc4210 from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 452 bytes
[SMB2] DEBUG | 'network' | NETWORK_processBytes: start packet 0x67fc41f8
[SMB2] DEBUG | 'smbv2' | SMB2_Processer: Remaining bytes 452
[SMB2] DEBUG | 'smbv2' | SMB2_Processer: Frame length is: 448
[SMB2] DEBUG | 'smbv2' | SMB2_Processer: Frame should be decodable
[SMB2] DEBUG | 'network' | NETWORK_processBytes: Found valid frame, decodedable, reset read pointer
[SMB2] DEBUG | 'smbv2' | SMB2_Decoder: CHECK IT! Frame length is: 448
[SMB2] INFO | 'smbv2' | SMB2_Decoder: Decoding Negotiate Reponse Message 0
[SMB2] DEBUG | 'smbv2' | Negotiate Protocol Response:
[SMB2] DEBUG | 'smbv2' | SMB2 Header [Response]:
[SMB2] DEBUG | 'smbv2' | ProtocolId: 0xfe534d42
[SMB2] DEBUG | 'smbv2' | Header Length: 64
[SMB2] DEBUG | 'smbv2' | Credit Charge: 0
[SMB2] DEBUG | 'smbv2' | Status: 0x00000000
[SMB2] DEBUG | 'smbv2' | Serverity: Sucess
[SMB2] DEBUG is pdu is NOT SIGNED
[SMB2] DEBUG | 'smbv2' | This pdu does NOT contain a PRIORITY
[SMB2] DEBUG | 'smbv2' | This is a normal operation
[SMB2] DEBUG | 'smbv2' | This is NOT a REPLAY operatio
[SMB2] DEBUG | 'smbv2' | Next command/chain offset: 0
[SMBB2] DEBUG | 'spnego' | 0x4e 0x54 0x4c 0x4d 0x53 0x53 0x50 0x00 0x01 0x00 0x00 0x00 0x35 0x82 0x08 0xe2
[SMB2] DEBUG | 'spnego' | 0x00 0x00 0x00 0x00 0x28 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x28 0x00 0x00 0x00
[SMB2] DEBUG | 'spnego' | 0x35| Session ID: 0x TODO
[SMB2] DEBUG | 'smbv2' | Signature: 0x TODO
[SMB2] DEBUG | 'smbv2' | StructureSize: 0x0019
[SMB2] DEBUG | 'smbv2' | Fixed Length Part: 12
[SMB2] DEBUG | 'smbv2' | Dynamic Part: True
[SMB2] DEBUG | 'smbv2' | Flags: 0x00
[SMBFO | 'ntlm' | Build: 0
[SMB2] INFO | 'ntlm' | NTLM Current Revision: 0
[SMB2] INFO | 'ntlm' | MIC:
[SMB2] INFO | 'ntlm' | 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[SMB2] DEBUG | 'ntlm' | 0x4e 0x54 0x4c 0xbe 0x80 0x23 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[SMB2] DEBUG | 'spnego' | 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[SMB2] DEBUG | 'spnego' | 0x0a 0x9c 0x27 0xda 0x77 0x03 0x4f 0xc6 0xce 0xfc 0x09 EBUG | 'spnego' | 0x1b 0xc6 0x66 0xd8 0x01 0x22 0xf0 0x91 0xf4 0xad 0x52 0x08 0xb7 0x00 0x00 0x00
[SMB2] DEBUG | 'spnego' | 0x00 0x03 0x00 0x1e 0x00 0x44 0x00 0x45 0x00 0x53 0x00 0x4b 0x00 0x54 0x00 0x4f
[SMB2] DEBUG | 'spnego' | 0x00 0x50 0x 0x0c 0x04 0x82 0x01
[SMB2] DEBUG | 'smbv2' | 0x08 0x4e 0x54 0x4c 0x4d 0x53 0x53 0x50 0x00 0x03 0x00 0x00 0x00 0x18 0x00 0x18
[SMB2] DEBUG | 'smbv2' | 0x00 0x68 0x00 0x00 0x00 0x52 0x00 0x52 0x00 0x80 0x00 0x00 0x00 0x1e 0x00 0x1e
[SMB2] DEailed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG eady descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROwork' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from Wai _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bror code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' ket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORKt 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pt 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0 into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEdy descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR t 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_part' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket requeeBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Readinnetwork' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMBiled with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG |SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading dy descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR ket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORKng from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading dETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'steBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Readint 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_p2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receing from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading d'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network't
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unkno0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] UG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveByteh 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 byt 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: TeBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Readin
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'startWake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWO DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORKdy descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR [SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start'eBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Readineady descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERRO DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: T 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: T'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network'ngBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 byt'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network'uest
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with undy descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR 2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWOdescriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'EBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'n failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUeBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading EBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'neive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error cBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_pr1 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] EDEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | '64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -ror code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'networrk' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERtwork' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading dat1 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] Ees into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] k' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSetart' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket requt with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read K_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | Nd with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'np from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_rec 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket r 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Tk' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying tody descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR ytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendy descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR ror code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with errod with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2]data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptg from socket request
...
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0x00000001 ready descriptors
[SMB2] DEBUG | 'start' | Reading from socket request
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Trying to receive 64736 bytes into 0x67fc452f from socket 0
[SMB2] DEBUG | 'network' | _iNETWORK_receiveBytes: Read 0 bytes
[SMB2] ERROR | 'network' | NETWORK_processBytes: Reading data failed with unknown error code
[SMB2] ERROR | 'start' | Reading failed with error code -4
[SMB2] DEBUG | 'network' | NETWORK_pendingBytes: Pending data in bytes to send: 0
[SMB2] DEBUG | 'start' | Wake up from WaitSelect with 0xffffffff ready descriptors
[SMB2] INFO | 'network' | NETWORK_getErrorNumber: CTRL-C detected
But investigation your output it seems that my program cannot handle the initial response from your server. I test against a mac computer. I will see if i can upgrade the implementation, to handle the response. Than we can see if it progress further with your setup.
Might it be possible, that you can capture the network traffic with wireshark on your Win10 machine, and give it to me?
AllocVecTags can fail for a number of reasons, the most obvious being insufficient memeory to meet the request. (that could be due to an overall lack of memory or due to memory fragmentations or asking for something very specific (an unssuported alignment maybe).
You should ALWAYS test the result for success and fail gracefully if possible if it fails.
AllocVecTags can fail for a number of reasons, the most obvious being insufficient memeory to meet the request. (that could be due to an overall lack of memory or due to memory fragmentations or asking for something very specific (an unssuported alignment maybe). You should ALWAYS test the result for success and fail gracefully if possible if it fails.
I have 2GB Ram and i test it just after a fresh restart, so i don't think that lack of memory or fragmentation paly a role. Furthermore on my machine the allocations made up till the crash. Each is less than 1024 bytes (and only around 6 allocations) and one or two bigger chunks around 65KB.
And you are right that the return result should be checked. If did checked it, i just forgot about it. If you see a something in the code, please let me know.
But the crash seems to be in AllocVecTags, thus it just returns nothing, which can be checked.And that drives my crazy. I think i'm accidentally poking in memory location, which i shouldn't. But my C skills aren't that good, that i immediately see such places.
Usually when strange things happen, its just before the crash that caused it.
Once memory corruption has happened, the OS can freeze or crash at any place, good practice is set pointer to NULL, after freeing it, or else you can be writing to random place in memory, and its wherry hard to debug.
I often write a small macro like this.
// safe free macro
#define sf(fn,ptr) if (ptr) { fn(ptr); ptr = NULL; } else { printf("ptr was freed before, or never allocated\n"); }
Boundary check macros can also be useful, when writing to pointer, you change to something more efficient when it works.
#define sw(ptr,value,line,fn) if (((ptr)<__min_ptr) | ((ptr)>__max_ptr)) { printf(“%d:%s: ptr is outside of limit\n”,line,fn); } else { *(ptr) = (value); }
Ptr+=4; //
sw(__FUNCTION__,__LINE__, ptr,value);
when allocated with malloc() or alloca(), it should not be freed with FreeVec(), make sure you know how it was allocated.
Monitor your memory usage at all times, you can’t afford to have memory leaks in AmigaOS4.x programs.
Edited by LiveForIt on 2022/5/16 9:45:55 Edited by LiveForIt on 2022/5/16 9:47:17 Edited by LiveForIt on 2022/5/16 9:51:34 Edited by LiveForIt on 2022/5/16 9:55:17 Edited by LiveForIt on 2022/5/16 9:56:58 Edited by LiveForIt on 2022/5/16 9:58:27 Edited by LiveForIt on 2022/5/16 9:58:57 Edited by LiveForIt on 2022/5/16 10:09:27
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
Thanks for the wireshark capturing. I will used it to improve the communication with other servers,
@LiveForIt
Thanks for idea with the macros.
Quote:
Monitor your memory usage at all times, you can’t afford to have memory leaks in AmigaOS4.x programs.
You are completely right. That's is way i want to really understand whats going wrong. I think one way would be to really debug the stuff on premises. But the spotless debugger from os4depot doesn't work for me. And the latest release from the Spotless debugger thread here on amigans, isn't accessible anymore. I Hope alfkil will soon release a version general available. And the GDB debugger, there I miss a little graphical support, plain text based interface is way out for me.
Thanks for all the input and hints. I'm have probably found thousand of bugs. But no found bug completely eliminates the "AllocVec" crash. It still comes up.
But if it doesn't crash, i can authenticate against all my SMB server, for which i have access to.
#ram:smbv2.debug SERVER=192.168.1.58 SHARE=SHARED USER=xxx PASSWORD=xxx Connecting to '192.168.1.58:445'...connected Negotiating dialect....accepted by server
Of course it is a Wombat. You might not get mixed up by a Quokka. Even cute, bur haven't met any in real life yet, so don't know if they get my excited as the wombats did, as i first encounter one in Crains zoo, along time ago.
@MigthyMax Windows 10 and 11 have support for both v1 and v2 samba, for v1 you have do install an additional samba packet (don't know if it requires Pro, since I only ever use Pro).
Well smbv1 doesn’t bother me. There is already a client available for it, but it doesn’t support smbv2. Thus I just targeting to implement a smbv2 client with NTLMv2 authentication. So that a samba share can be accessed from the amiga without playing around at the server.
I had access to an Win10 Server and could test my implementation and ran in the same bug as you discovered in my implementation. Here is a fixed version, please if you like test it again:
Even that the strange AllocBehavior disappars more and more. i got output on the shell, which isn't programmed. Anyone an idea what could cause that. See the image and the zeros:
Quote:
Connecting to '172.16.0.122:445'...connected Negotiating dialect....accepted by server Authenticating user....0000000000000000000000000000000000000000000000000000000000000000sucees
(Well don't how to add an image, so typed out) It seems to be exactly 64 zeros.
Are your sources open? Seems like you are printing some memory area initialized with zeroes (MEMF_CLEAR AllocVec TAG). One way to isolate it sholud be initialize memory with 1 (Clear_value TAG).
Something like that might it be, but currently i have no idea where to look. But i have the fleeing it might be wrong format string for some output and/or 64 ints alignment stuff.