{"id":30138259,"url":"https://github.com/stephenlb/c-core-subscribe-issue-reproduction","last_synced_at":"2025-08-11T01:05:51.037Z","repository":{"id":303456340,"uuid":"1015527912","full_name":"stephenlb/c-core-subscribe-issue-reproduction","owner":"stephenlb","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-07T17:48:45.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T18:54:13.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenlb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-07T16:28:18.000Z","updated_at":"2025-07-07T17:48:48.000Z","dependencies_parsed_at":"2025-07-07T18:54:16.598Z","dependency_job_id":"b7bcd4ce-2f3a-48a4-939f-341276f4f20a","html_url":"https://github.com/stephenlb/c-core-subscribe-issue-reproduction","commit_stats":null,"previous_names":["stephenlb/c-core-subscribe-issue-reproduction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stephenlb/c-core-subscribe-issue-reproduction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fc-core-subscribe-issue-reproduction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fc-core-subscribe-issue-reproduction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fc-core-subscribe-issue-reproduction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fc-core-subscribe-issue-reproduction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenlb","download_url":"https://codeload.github.com/stephenlb/c-core-subscribe-issue-reproduction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fc-core-subscribe-issue-reproduction/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269814714,"owners_count":24479434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-11T01:05:50.433Z","updated_at":"2025-08-11T01:05:51.024Z","avatar_url":"https://github.com/stephenlb.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PubNub C-Core v5.1.1 Subscribe Bug - Reproduction Summary\n\n## Summary\n\nA reproduction case has been created for the reported PubNub C-Core v5.1.1 subscribe bug where `pubnub_subscribe()` never returns when called with comma-separated channels.\n\n**Current Status**: The reproduction program runs successfully without hanging, suggesting the bug may be configuration-specific, environment-dependent, or requires specific conditions to trigger.\n\n## Test Environment\n\n- **Platform**: macOS 14.5.0 (Darwin 24.5.0)\n- **Compiler**: Apple Clang\n- **PubNub Version**: v5.1.1 (updated from v5.1.0)\n- **Test Date**: 2025-07-07\n\n## Test Results\n\n### Latest Test Run (2025-07-07 14:03:45)\n\n**Build Command**:\n```bash\n./setup_and_test.sh\n./setup_and_test.sh --run\n```\n\n**Result**: ✅ **SUCCESSFUL EXECUTION**\n```\n[2025-07-07 14:03:45] Step 6: Calling pubnub_subscribe with comma-separated channels...\nChannels: 'test_channel_1,test_channel_2'\nChannel Group: NULL\n[2025-07-07 14:03:45] pubnub_subscribe returned with result: 14\n[2025-07-07 14:03:45] Subscribe started successfully, now calling pubnub_await...\n[2025-07-07 14:03:45] Step 7: Calling pubnub_await...\n[2025-07-07 14:03:45] pubnub_await returned with result: 0\n[2025-07-07 14:03:45] ✓ Subscribe completed successfully\n```\n\n**Test Results Summary**:\n- **Setup**: ✅ PubNub C-Core v5.1.1 downloaded and compiled successfully\n- **Compilation**: ✅ Reproduction program compiled with 2 warnings (unused variables)\n- **Execution Time**: \u003c 1 second\n- **pubnub_subscribe()** returned `PNR_STARTED` (14) immediately ✅\n- **pubnub_await()** completed with `PNR_OK` (0) ✅\n- **No hanging behavior observed** ✅\n- **Publish test**: ✅ Completed successfully with connection verified\n\n## Reproduction Program Details\n\n### Exact API Call Sequence (Matches User Report)\n```c\npubnub_t *ctx = pubnub_alloc();                    // ✅ Step 1\npubnub_init(ctx, \"demo\", \"demo\");                  // ✅ Step 2\npubnub_use_http_keep_alive(ctx);                   // ✅ Step 3\npubnub_set_user_id(ctx, \"bug_reproduction_user\");  // ✅ Step 4\npubnub_set_auth(ctx, \"test_auth_key\");             // ✅ Step 5 (now included)\npubnub_subscribe(ctx, \"test_channel_1,test_channel_2\", NULL);  // ✅ Step 6\npubnub_await(ctx);                                 // ✅ Step 7\npubnub_get(ctx);                                   // ✅ Step 8\n```\n\n### Key Parameters (Matches User Report)\n- **Channels**: `\"test_channel_1,test_channel_2\"` (comma-separated list of 2 channels) ✅\n- **Channel Group**: `NULL` ✅\n- **Logging**: `PUBNUB_LOG_LEVEL_TRACE` enabled ✅\n\n### Safety Features Implemented\n- **Timeout Protection**: 10-second transaction timeout to prevent infinite hanging\n- **Signal Handling**: Graceful exit on Ctrl+C\n- **Comprehensive Logging**: Timestamped debug output at each step\n- **Error Code Interpretation**: Detailed result code analysis\n\n## Analysis\n\n### Why the Bug Might Not Be Reproducing\n\n1. **Platform Differences**: \n   - User environment (likely Linux/embedded) vs test environment (macOS)\n   - Different networking stack behavior\n\n2. **Build Configuration**:\n   - Different compiler flags or preprocessor definitions\n   - Threading model differences (`PUBNUB_THREADSAFE` settings)\n   - Memory allocation strategy differences\n\n3. **Network Environment**:\n   - Corporate proxy/firewall settings\n   - Network latency or connectivity issues\n   - DNS resolution differences\n\n4. **Runtime Conditions**:\n   - System resource constraints\n   - Multi-threading race conditions\n   - Memory pressure scenarios\n\n### Evidence Supporting Bug Existence\n\n1. **User's Specific Environment**: Bug may be environment-specific\n2. **Version Timing**: Issue appeared specifically in v5.1.1, suggesting architectural changes\n3. **Configuration Dependencies**: Different build configurations may trigger the issue\n\n## Deliverables\n\n### Files\n1. **`pubnub_subscribe_bug_reproduction.c`**: Complete reproduction program\n2. **`setup_and_test.sh`**: Automated setup and compilation script\n3. **`Makefile`**: Build configuration with all necessary PubNub source files\n4. **`COMPILE_INSTRUCTIONS.md`**: Comprehensive compilation guide\n5. **`README_RESULTS.md`**: Detailed test results and analysis\n\n### Compilation Instructions\n```bash\n# Quick setup (downloads PubNub C-Core v5.1.1 and compiles)\n./setup_and_test.sh\n\n# Run the reproduction test\n./setup_and_test.sh --run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fc-core-subscribe-issue-reproduction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenlb%2Fc-core-subscribe-issue-reproduction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fc-core-subscribe-issue-reproduction/lists"}