This paper focuses on the deadlock control and scheduling problem of two-stage assembly permutation flowshop with limited buffers. In such a system, all parts are first processed in a permutation flowshop, then assembled into final products. The objective is to find a feasible schedule, including a manufacturing subschedule and an assembly subschedule, to minimize makespan. Owing to limited buffers, not only may the blocking phenomenon appear in the system operation, but also some manufacturing subschedules may lead to deadlock states, making them unavailable. To obtain a feasible schedule, this work first proposes a deadlock control or an availability detection and amendment (ADA) algorithm to determine whether a manufacturing subschedule is available, and convert unavailable ones to available ones. Then by embedding ADA into a social spider algorithm (SSA), a hybrid social spider algorithm (HSSA) is developed for computing feasible schedules. In HSSA, an improved heuristic search algorithm is proposed to generate a better initial population, and a simplified variable neighborhood search algorithm is designed and incorporated into HSSA to enhance its searching ability. Finally, HSSA is tested on instances, showing its superiority over SSA in performance. The effect of buffer size on the scheduling objective is discussed.