Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 854060 - net-libs/nodejs: check for CONFIG_ADVISE_SYSCALLS in kernel configuration
Summary: net-libs/nodejs: check for CONFIG_ADVISE_SYSCALLS in kernel configuration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL: https://github.com/nodejs/node/discus...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-24 10:16 UTC by Amit Prakash Ambasta
Modified: 2022-07-26 21:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Prakash Ambasta 2022-06-24 10:16:50 UTC
While emerging nodejs, mksnapshot segfaults on page_allocator->DiscardSystemPages( reinterpret_cast<void*>(memory_area.begin()), memory_area.size())

This is due to CONFIG_ADVISE_SYSCALLS not being present in the kernel and is required for mksnapshot assertions to work correctly.

This in turn causes emerge to fail

Reproducible: Always

Steps to Reproduce:
1. configure kernel w/ CONFIG_ADVISE_SYSCALLS=n
2. emerge nodejs
3. Notice segfault
Actual Results:  
#
# Fatal error in , line 0
# Check failed: page_allocator->DiscardSystemPages( reinterpret_cast<void*>(memory_area.begin()), memory_area.size()).
#
#
#
#FailureMessage Object: 0x7ffed9001310
==== C stack trace ===============================

    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot() [0x88795c]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(V8_Fatal(char const*, ...)+0x15a) [0x87c8fa]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot() [0x1487708]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Sweeper::RawSweep(v8::internal::Page*, v8::internal::Sweeper::FreeListRebuildingMode, v8::internal::FreeSpaceTreatmentMode, v8::internal::Sweeper::SweepingMode, v8::base::LockGuard<v8::base::Mutex, (v8::base::NullBehavior)0> const&)+0x1b37) [0x14c1377]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Sweeper::ParallelSweepPage(v8::internal::Page*, v8::internal::AllocationSpace, v8::internal::Sweeper::SweepingMode)+0xa2) [0x14c1bb2]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Sweeper::ParallelSweepSpace(v8::internal::AllocationSpace, v8::internal::Sweeper::SweepingMode, int, int)+0x93) [0x14c1cf3]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::PagedSpace::RawRefillLabMain(int, v8::internal::AllocationOrigin)+0x27f) [0x149d16f]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int)+0x320) [0x147c770]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*)+0xd8d) [0x147fd4d]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*)+0x71) [0x1447041]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::PageEvacuationJob::Run(v8::JobDelegate*)+0x1a6) [0x1447416]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::platform::DefaultJobState::Join()+0x8f) [0x88d62f]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::platform::DefaultJobHandle::Join()+0x13) [0x88d6a3]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(unsigned long v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, std::vector<std::pair<v8::internal::ParallelWorkItem, v8::internal::MemoryChunk*>, std::allocator<std::pair<v8::internal::ParallelWorkItem, v8::internal::MemoryChunk*> > >, v8::internal::MigrationObserver*)+0x81f) [0x145aedf]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::MarkCompactCollector::EvacuatePagesInParallel()+0x37e) [0x145b34e]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::MarkCompactCollector::Evacuate()+0x196) [0x147b766]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::MarkCompactCollector::CollectGarbage()+0x58) [0x147c428]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Heap::MarkCompact()+0x231) [0x14272b1]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags)+0x688) [0x14280b8]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)+0x339) [0x1428ae9]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason)+0x76) [0x142b636]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::SnapshotCreator::CreateBlob(v8::SnapshotCreator::FunctionCodeHandling)+0x394) [0x132db54]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(v8::internal::CreateSnapshotDataBlobInternal(v8::SnapshotCreator::FunctionCodeHandling, char const*, v8::Isolate*)+0x9d) [0x174a5bd]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(main+0x467) [0x864847]
    /usr/lib64/libc.so.6(+0x29017) [0x7ff5d5fc5017]
    /usr/lib64/libc.so.6(__libc_start_main+0x85) [0x7ff5d5fc50d5]
    /var/tmp/portage/net-libs/nodejs-18.4.0/work/node-v18.4.0/out/Release/mksnapshot(_start+0x21) [0x86cf81]
make: *** [tools/v8_gypfiles/v8_snapshot.target.mk:17: cc9af2ae34804af4318328ae3a3ea02f9e3d9873.intermediate] Trace/breakpoint trap (core dumped)
make: *** Deleting file 'cc9af2ae34804af4318328ae3a3ea02f9e3d9873.intermediate'
rm cefc0fddcdc3061614725d6daab8a2569751d91e.intermediate efa5bda3af74ac6b1870e6037eede575ce148025.intermediate 489906b104ce95c2c198ab9a271321bc81f79324.intermediate

Expected Results:  
nodejs should emerge successfully
Comment 1 Larry the Git Cow gentoo-dev 2022-07-26 21:55:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bf6a6ce257627c54eb4b0be6beabebe4f3ccd90

commit 0bf6a6ce257627c54eb4b0be6beabebe4f3ccd90
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-07-26 21:55:24 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-07-26 21:55:24 +0000

    net-libs/nodejs: add 14.20.0
    
    Closes: https://bugs.gentoo.org/854060
    Bug: https://bugs.gentoo.org/854060
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-14.20.0.ebuild | 232 ++++++++++++++++++++++++++++++++++
 2 files changed, 233 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17797be01d22924b319dd44daa7385a42bfd284b

commit 17797be01d22924b319dd44daa7385a42bfd284b
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-07-26 21:55:23 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-07-26 21:55:23 +0000

    net-libs/nodejs: add 16.16.0
    
    Closes: https://bugs.gentoo.org/854060
    Bug: https://bugs.gentoo.org/854060
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-16.16.0.ebuild | 224 ++++++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb06c46d44f1b9cf0e2af3b0679a5908da565f5e

commit eb06c46d44f1b9cf0e2af3b0679a5908da565f5e
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-07-26 21:55:23 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-07-26 21:55:23 +0000

    net-libs/nodejs: add 18.6.0
    
    Closes: https://bugs.gentoo.org/854060
    Bug: https://bugs.gentoo.org/854060
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest             |   1 +
 net-libs/nodejs/nodejs-18.6.0.ebuild | 224 +++++++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bf6a6ce257627c54eb4b0be6beabebe4f3ccd90

commit 0bf6a6ce257627c54eb4b0be6beabebe4f3ccd90
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-07-26 21:55:24 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-07-26 21:55:24 +0000

    net-libs/nodejs: add 14.20.0
    
    Closes: https://bugs.gentoo.org/854060
    Bug: https://bugs.gentoo.org/854060
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-14.20.0.ebuild | 232 ++++++++++++++++++++++++++++++++++
 2 files changed, 233 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17797be01d22924b319dd44daa7385a42bfd284b

commit 17797be01d22924b319dd44daa7385a42bfd284b
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-07-26 21:55:23 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-07-26 21:55:23 +0000

    net-libs/nodejs: add 16.16.0
    
    Closes: https://bugs.gentoo.org/854060
    Bug: https://bugs.gentoo.org/854060
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest              |   1 +
 net-libs/nodejs/nodejs-16.16.0.ebuild | 224 ++++++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb06c46d44f1b9cf0e2af3b0679a5908da565f5e

commit eb06c46d44f1b9cf0e2af3b0679a5908da565f5e
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-07-26 21:55:23 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-07-26 21:55:23 +0000

    net-libs/nodejs: add 18.6.0
    
    Closes: https://bugs.gentoo.org/854060
    Bug: https://bugs.gentoo.org/854060
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 net-libs/nodejs/Manifest             |   1 +
 net-libs/nodejs/nodejs-18.6.0.ebuild | 224 +++++++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+)