summaryrefslogtreecommitdiffhomepage
path: root/src/core (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-27Win32: shared memory base addresses and remapping.Maxim Dounin1-0/+16
Two mechanisms are implemented to make it possible to store pointers in shared memory on Windows, in particular on Windows Vista and later versions with ASLR: - The ngx_shm_remap() function added to allow remapping of a shared memory zone to the address originally used for it in the master process. While important, it doesn't solve the problem by itself as in many cases it's not possible to use the address because of conflicts with other allocations. - We now create mappings at the same address in all processes by starting mappings at predefined addresses normally unused by newborn processes. These two mechanisms combined allow to use shared memory on Windows almost without problems, including reloads. Based on the patch by Sergey Brester: http://mailman.nginx.org/pipermail/nginx-devel/2015-April/006836.html
2015-04-27Win32: fixed shm.handle loss on reload.Maxim Dounin1-0/+3
2015-04-25Core: the ngx_set_connection_log() macro.Vladimir Homutov1-0/+11
The http and stream versions of this macro were identical.
2015-04-23Removed the "worker_rlimit_sigpending" directive.Ruslan Ermilov2-9/+0
It was only needed by the just removed rtsig module.
2015-04-23Removed the obsolete rtsig module.Ruslan Ermilov2-20/+7
2015-04-22Removed the obsolete aio module.Ruslan Ermilov2-2/+2
2015-04-20Core: allow shared memory size to be declared after a reference.Sergey Kandaurov1-0/+4
For example, this fixes the case when "proxy_cache_path" is specified after "proxy_cache" that references it.
2015-04-20Stream: port from NGINX+.Ruslan Ermilov2-2/+3
2015-03-26Removed "worker_threads" and "thread_stack_size" directives.Ruslan Ermilov2-37/+0
2015-03-26Removed unused thread-local-storage code.Ruslan Ermilov2-16/+0
2015-03-26Removed ngx_threaded and related code.Ruslan Ermilov1-37/+0
2015-04-16Core: ensure that ngx_config.h is always included first.Sergey Kandaurov1-0/+3
This fixes compilation of various 3rd party modules when nginx is configured with threads.
2015-04-16Version bump.Maxim Dounin1-2/+2
2015-04-14Upstream: the "zone" directive.Ruslan Ermilov3-1/+12
Upstreams with the "zone" directive are kept in shared memory, with a consistent view of all worker processes.
2015-03-21Core: read/write locks.Ruslan Ermilov3-0/+134
2015-04-16Fixed build, broken by 8b7f062a3fe6.Ruslan Ermilov1-1/+2
Casting a "const char *" to "char *" doesn't work on older gcc versions.
2015-04-16Core: added OpenSSL version information to "nginx -V" output.Vladimir Homutov1-5/+16
2015-04-16Version bump.Vladimir Homutov1-2/+2
2015-03-26Core: guard against spinlock usage without atomic ops.Ruslan Ermilov1-1/+1
The new thread pools code uses spinlocks.
2015-04-07Core: limited levels of subdirectory hierarchy used for temp files.Sergey Kandaurov1-0/+4
Similar to ngx_http_file_cache_set_slot(), the last component of file->name with a fixed length of 10 bytes, as generated in ngx_create_temp_path(), is used as a source for the names of intermediate subdirectories with each one taking its own part. Ensure that the sum of specified levels with slashes fits into the length (ticket #731).
2015-04-07Core: removed excessive initialization in ngx_conf_set_path_slot().Sergey Kandaurov1-4/+0
Level hierarchy is pre-zeroed in ngx_pcalloc() of the surrounding ngx_path_t.
2015-04-07Core: fixed error handling on ngx_conf_full_name() failure.Sergey Kandaurov1-1/+1
2015-03-26Version bump.Maxim Dounin1-2/+2
2015-03-23Output chain: free chain links in ngx_chain_writer().Maxim Dounin1-4/+12
2015-03-23Output chain: zero size buf alerts in ngx_chain_writer().Maxim Dounin1-1/+32
Now we log a "zero size buf in chain writer" alert if we encounter a zero sized buffer in ngx_chain_writer(), and skip the buffer.
2015-03-23Thread pools: implemented graceful exiting of threads.Valentin Bartenev1-3/+34
2015-03-23Thread pools: removed unused pointer to memory pool.Valentin Bartenev1-2/+0
No functional changes.
2015-03-23Thread pools: keep waiting tasks mutex in ngx_thread_pool_t.Valentin Bartenev1-45/+20
It's not needed for completed tasks queue since the previous change. No functional changes.
2015-03-23Thread pools: replaced completed tasks queue mutex with spinlock.Valentin Bartenev1-16/+5
2015-03-23Removed stub implementation of win32 mutexes.Ruslan Ermilov1-10/+0
2015-03-19Core: added cyclic memory buffer support for error_log.Valentin Bartenev1-0/+120
Example of usage: error_log memory:16m debug; This allows to configure debug logging with minimum impact on performance. It's especially useful when rare crashes are experienced under high load. The log can be extracted from a coredump using the following gdb script: set $log = ngx_cycle->log while $log->writer != ngx_log_memory_writer set $log = $log->next end set $buf = (ngx_log_memory_buf_t *) $log->wdata dump binary memory debug_log.txt $buf->start $buf->end
2015-03-20Removed ngx_connection_t.lock.Ruslan Ermilov2-16/+0
2015-03-19Thread pools: silence warning on process exit.Ruslan Ermilov1-0/+7
Work around pthread_cond_destroy() and pthread_mutex_destroy() returning EBUSY. A proper solution would be to ensure all threads are terminated.
2015-03-19Thread pools: fixed the waiting tasks accounting.Ruslan Ermilov1-7/+8
Behave like POSIX semaphores. If N worker threads are waiting for tasks, at least that number of tasks should be allowed to be put into the queue.
2015-03-19Thread pools: keep waiting tasks counter in ngx_thread_pool_t.Ruslan Ermilov1-9/+7
It's not needed for completed tasks queue. No functional changes.
2015-03-14Added support for offloading Linux sendfile() in thread pools.Valentin Bartenev1-0/+4
2015-03-14Added support for offloading read() in thread pools.Valentin Bartenev3-10/+38
2015-03-14Thread pools implementation.Valentin Bartenev3-0/+671
2015-03-04Renamed NGX_THREADS to NGX_OLD_THREADS because of deprecation.Ruslan Ermilov7-12/+16
It's mostly dead code and the original idea of worker threads has been rejected.
2015-03-17Overflow detection in ngx_inet_addr().Ruslan Ermilov1-2/+6
2015-03-17Core: overflow detection in ngx_parse_time() (ticket #732).Ruslan Ermilov1-16/+37
2015-03-17Refactored ngx_parse_time().Ruslan Ermilov1-3/+1
No functional changes.
2015-03-17Core: overflow detection in number parsing functions.Ruslan Ermilov2-52/+72
2015-03-17Core: expose maximum values of time_t and ngx_int_t.Ruslan Ermilov1-0/+3
These are needed to detect overflows.
2015-03-04Log: use ngx_cpymem() in a couple of places, no functional changes.Valentin Bartenev1-6/+3
2015-02-24Core: fixed potential buffer overrun when initializing hash.Maxim Dounin1-1/+1
Initial size as calculated from the number of elements may be bigger than max_size. If this happens, make sure to set size to max_size. Reported by Chris West.
2015-02-17Core: make ngx_connection_local_sockaddr() always assign address.Roman Arutyunyan1-17/+17
Previously, this function checked for connection local address existence and returned error if it was missing. Now a new address is assigned in this case making it possible to call this function not only for accepted connections.
2015-02-11Unbreak building on FreeBSD without file AIO.Valentin Bartenev1-1/+1
It appeared that the NGX_HAVE_AIO_SENDFILE macro was defined regardless of the "--with-file-aio" configure option and the NGX_HAVE_FILE_AIO macro. Now they are related. Additionally, fixed one macro.
2015-02-11Refactored sendfile() AIO preload.Valentin Bartenev3-2/+35
This reduces layering violation and simplifies the logic of AIO preread, since it's now triggered by the send chain function itself without falling back to the copy filter. The context of AIO operation is now stored per file buffer, which makes it possible to properly handle cases when multiple buffers come from different locations, each with its own configuration.
2015-02-11Version bump.Ruslan Ermilov1-2/+2