Reporting the following error, I cannot basicly do anything, active monitoring option is gone and I cannot view any host, flow details or anything. Is aquired successfully and the GenericHash::purgeIdle isįree to delete entries from the hash table.So, I am heavily relying on the Active Monitoring feature of ntopng, but unfortunately it just keeps crashing. inline additions are performed withouth locks as listĪccess won't break any concurrent hash table access.Offline threads can access the same hash table entries Guarantees an elevated degree of parallelism as multiple RwLock::rdlock when accessing any hash table. offline operations always acquire read locks.Hash table locks are implemented in class RwLock which Is_inline_call and will only lock the hash Methods such as HostHash::get take a parameter Hash table, it will not delete or add entries to it. Inline, there is no need to lock when the same inline Performs the delete as follow: if(head_state = hash_entry_state_ready_to_be_purged)Īs additions and deletions to the hash tables are performed Hash_entry_state_ready_to_be_purged one last time and it Set_hash_entry_state_ready_to_be_purged() įinally, inline method GenericHash::purgeIdle, while Hash_entry_state_ready_to_be_purged is performed if theĮntry was in hash_entry_state_idle: if(get_state() = hash_entry_state_idle) The transition is done when this call returns true: if(head_state = hash_entry_state_active & head->is_hash_entry_state_idle_transition_ready())Īt this point, an offline periodic thread callsįlow::update_hosts_stats in which the transition to Is_hash_entry_state_idle_transition_ready() is called and Their transition to state hash_entry_state_idle. The flows_hash to check for idle flows and possibly do Periodically, inline method GenericHash::purgeIdle walks NetworkInterface::getFlow instantiates a FlowĪnd adds it to the flows_hash hash table with aįlows_hash->add call. The very same operations are performed for all the other hash entriesĪssuming a new flow is detected, inline method Lifecycle state machine is handled at runtime for Flows. new.įollowing are some code snippets that try and demonstrate how the The following diagram recaps the states transitions. Once this state has been set, the inline-thread will perform the actual Thread has seen the entry before cleaning it up and freeing its memory. UpdateStats, only after the inline thread has set state This state is setīy an offline periodic thread, generally in method State hash_entry_state_ready_to_be_purged. Marked as hash_entry_state_idle, it won't be returned toĪny of the threads that are accessing the hash table with one exception:Īn offline periodic thread which will perform an extra transition to Is used to explicitly mark the entry as idle. GenericHash::purgeIdle which is called inline and GenericHashEntry-inherited hash entry is instantiated The lifecycle is implemented as a state machine with the following Inconsistent accesses or even crashes, a lifecycle is defined an For this reason, to guarantee no thread isĪccessing an entry that is being deleted or added, resulting in At the same time, other threads are allowed toĪccess the hash table. Hash entries are always instantiated, added to their hash table, andĭeleted inline. Hash table entries, such as the Host and theįlow, inherit from class GenericHashEntry. HostHash, inherit from class GenericHashTable. Hash tables in the code, such as the FlowHash and the Web server threads accessing the hash table when the user isĬoncurrent accesses require special care to prevent race conditions.Timeseries, trigger alerts, and perform other operations. Periodic threads that execute lua scripts (e.g.,.A periodic thread that updates stats such as hosts throughputs.Other operations are referred to as offline. Performed in this thread are referred to as inline, all the The thread that capture packets or receives flows.Ntopng heavily relies on hash tables to keep flows, hosts, autonomous See also the last Fossies "Diffs" side-by-side code changes report for "_entries_lifecycle.md": 4.0_vs_4.2.Ī hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window. As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format).Īlternatively you can here view or download the uninterpreted source code file.Ī member file download can also be achieved by clicking within a package contents listing on the according byte size field.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |