Commit Graph
19 Commits
Author SHA1 Message Date
cozis e1fa3729c6 Drop the MAX_CONNS macro and define TCP_CONNECTION_LIMIT, TCP_POLL_CAPACITY, TCP_EVENT_CAPACITY instead 2025-11-22 22:59:32 +01:00
cozis b0313ffcf8 Make toasty client thread-safe and implement toasty_wakeup 2025-11-20 03:51:01 +01:00
cozis 3fc1e12623 Modify Makefile clean rule to remove compilation artifacts by their extension (.exe, .out, ...), not their full name 2025-11-17 11:46:23 +01:00
cozis 9a944feb01 Rewrote simulation scheduler and fixed some bugs 2025-11-14 01:16:48 +01:00
cozis 6a608051d6 Clean up timeout code in metadata server 2025-11-10 15:07:38 +01:00
cozis 9cdf636eb6 Bug fix 2025-11-10 12:41:18 +01:00
cozis 36925309da Bug fix 2025-11-10 12:26:25 +01:00
cozis 62d7439ddd Set sockets as non-blocking and fix chunk server timeout 2025-11-09 21:30:22 +01:00
Claude 1a2c02203d Set sockets as non-blocking in tcp.c and add blocking checks
Changes:
- Added is_nonblocking flag to Descriptor structure in system.c
- Implemented mock_fcntl (Linux) and mock_ioctlsocket (Windows) to handle setting sockets as non-blocking
- Set all sockets as non-blocking in tcp.c:
  - Listen sockets in create_listen_socket()
  - Accepted sockets in tcp_translate_events()
  - Connecting sockets in tcp_connect()
- Added checks in mock_accept(), mock_recv(), and mock_send() to abort the simulation if a socket would block but is not configured as non-blocking
- This ensures proper non-blocking socket configuration and helps catch blocking socket errors during simulation
2025-11-09 19:51:09 +00:00
cozis 753aba9e63 Progress 2025-11-09 17:39:53 +01:00
cozis e7455cc4ed Progress 2025-11-06 01:00:39 +01:00
cozis e124952fe2 Progress 2025-11-05 14:26:57 +01:00
cozis 31a4b2cc32 Bug fixes 2025-11-03 18:32:14 +01:00
cozis e135d871c1 Progress 2025-11-03 15:52:25 +01:00
Claude 3ae2f13610 Fix all Valgrind errors: uninitialized values and memory leak
This commit resolves all Valgrind errors reported in the test run:

1. Fixed uninitialized 'removed' array in tcp_translate_events (tcp.c:179)
   - Added memset to initialize the array to zero before use

2. Fixed uninitialized RequestQueue in client initialization (client.c)
   - Added initialization of metadata_server.reqs and chunk_servers[].reqs
   - Added forward declaration of request_queue_init function

3. Fixed uninitialized descriptor generation field (system.c:324)
   - Initialize generation to 0 when creating process descriptors
   - Prevents uninitialized value errors in handle_to_desc

4. Fixed 34-byte memory leak in tcp_context_free (tcp.c:91-103)
   - Added cleanup of connection byte queues when freeing TCP context
   - Frees both input and output ByteQueues for all connections

All Valgrind errors have been resolved:
- ERROR SUMMARY: 0 errors from 0 contexts
- All heap blocks freed - no leaks possible
2025-11-02 13:24:18 +00:00
cozis 7525a93035 Progress 2025-10-29 23:48:45 +01:00
cozis 174f37c6c0 Continue work on DST framework 2025-10-29 21:46:17 +01:00
cozis 7bc4071344 Start work on DST 2025-10-29 10:41:23 +01:00
cozis c5a21608d7 Split project over multiple files 2025-10-28 17:24:25 +01:00