Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • crown-core crown-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 75
    • Issues 75
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Crown
  • crown-corecrown-core
  • Issues
  • #306

Closed
Open
Created Feb 11, 2019 by J. Herranz@CrownfanReporter

non initialized pointer in printf causes systemnode crash

Reported by community member @Void through discord development channel on February 10th:

hi, I noticed today system node crash. This is the log:

2019-02-10 09:12:23 BudgetDraft::AutoCheck - waiting
2019-02-10 09:12:23 CBudgetManager::CheckAndRemove - pbudgetDraft->IsValid - strError:
2019-02-10 09:12:23 BudgetDraft::AutoCheck - waiting
2019-02-10 09:12:23 CBudgetManager::CheckAndRemove - mapProposals cleanup - size: 22
2019-02-10 09:12:23 CBudgetManager::CheckAndRemove - PASSED
2019-02-10 09:12:23 CBudgetManager::NewBlock - askedForSourceProposalOrBudget cleanup - size: 1
2019-02-10 09:12:23 CBudgetManager::NewBlock - mapProposals cleanup - size: 22
2019-02-10 09:12:23 CBudgetManager::NewBlock - mapBudgetDrafts cleanup - size: 2
2019-02-10 09:12:23 CBudgetManager::NewBlock - vecImmatureBudgetProposals cleanup - size: 0
2019-02-10 09:12:23 CBudgetManager::NewBlock - vecImmatureBudgetDrafts cleanup - size: 0
2019-02-10 09:12:23 CBudgetManager::NewBlock - PASSED
2019-02-10 09:12:23 ProcessNewBlock : ACCEPTED
2019-02-10 09:12:23 fbvote - new finalized budget vote - c2540980f13c007433019290b8509359503ba2110152b85908e7c9205e8aac73
2019-02-10 09:12:23 fbvote - new finalized budget vote - 8fefaca24e857698e2e68c25537f58fb7ed4c84e8cf7392c3fb564632924ece5
2019-02-10 09:12:50 snb - Got NEW systemnode entry - f5da54842ce4e9899f00e99e64123b169361e4b3ab6b7f7561578d948ee285e0 - 85.255.8.30:9340 - CTxIn(COutPoint(26bf9045fdc7b42cbc349b7a747d1d0464629e7a3c12d8097180512ea3787ff3, 0), scriptSig$2019-02-10 09:13:07 CheckBlock() : skipping transaction locking checks
2019-02-10 09:13:07 UpdateTip: new best=a5f8421f1ddfd857f9cd2f17f55a0e60918a225905d6a529c5ee2f8786512c1b  height=2245621  log2_work=86.286514  tx=2480842  date=2019-02-10 09:12:27 progress=1.000000  cache=71.5MiB(255354tx)
2019-02-10 09:13:07 ProcessNewBlock : ACCEPTED
2019-02-10 09:13:46

notice last line containing only date and time

I saw similar issue with other masternode coin and it was caused by using non initialized pointer in printf

I think in crown code there may be similar issue

this was introduced fix:

-     printf("i.%d np->ht %d [%d].ht %d >= nHeight.%d\n",i,np->nHeight,i,NPOINTS[i].nHeight,nHeight);
+     printf("i.%d np->ht %d [%d].ht %d >= nHeight.%d\n",i,np ? np->nHeight : 0,i,NPOINTS[i].nHeight,nHeight);

np ? np->nHeight : 0 prevents access of not initialized pointer

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking